diff -ur ooo_SRC680_m179_src.orig/vcl/aqua/inc/aquavclevents.hxx ooo_SRC680_m179_src/vcl/aqua/inc/aquavclevents.hxx
--- ooo_SRC680_m179_src.orig/vcl/aqua/inc/aquavclevents.hxx	2006-08-02 22:58:27.000000000 +0200
+++ ooo_SRC680_m179_src/vcl/aqua/inc/aquavclevents.hxx	2006-08-02 22:58:30.000000000 +0200
@@ -41,4 +41,10 @@
 const EventTypeSpec cMenuClosedEvent = { kEventClassMenu, kEventMenuClosed };
 const EventTypeSpec cMenuTargetItemEvent = { kEventClassMenu, kEventMenuTargetItem };
 
+/* Events for keyboard */
+const EventTypeSpec cKeyboardRawKeyEvents[]		= { { kEventClassKeyboard, kEventRawKeyDown},
+							    { kEventClassKeyboard, kEventRawKeyUp},
+							    { kEventClassKeyboard, kEventRawKeyRepeat},
+							    { kEventClassKeyboard, kEventRawKeyModifiersChanged} };
+
 #endif // INCLUDED_AQUAVCLEVENTS_HXX
diff -ur ooo_SRC680_m179_src.orig/vcl/aqua/source/window/salframe.cxx ooo_SRC680_m179_src/vcl/aqua/source/window/salframe.cxx
--- ooo_SRC680_m179_src.orig/vcl/aqua/source/window/salframe.cxx	2006-08-02 22:58:27.000000000 +0200
+++ ooo_SRC680_m179_src/vcl/aqua/source/window/salframe.cxx	2006-08-02 22:58:30.000000000 +0200
@@ -56,6 +56,9 @@
 #ifndef _SV_SALINST_H
 #include <salinst.h>
 #endif
+#ifndef _SV_SALWTYPE_HXX
+#include <salwtype.hxx>
+#endif
 
 #include <aquavclevents.hxx>
 
@@ -1152,6 +1155,271 @@
     return eventNotHandledErr;
 }
 
+void DbgPrintModifiers (UInt32 keyModifiers) {
+
+      fprintf (stderr, "PJ: ...... keyModifiers: ");
+      if (keyModifiers & cmdKey)
+	fprintf (stderr, "cmdKey, ");
+      if (keyModifiers & shiftKey)
+	fprintf (stderr, "shiftKey, ");
+      if (keyModifiers & alphaLock)
+	fprintf (stderr, "alphaLock (CapsLock), ");
+      if (keyModifiers & optionKey)
+	fprintf (stderr, "optionKey, ");
+      if (keyModifiers & controlKey)
+	fprintf (stderr, "controlKey, ");
+      fprintf (stderr, "\n");
+}
+
+// Table for translation of system key code to sal keycodes
+#define KEY_TAB_SIZE 131
+
+static USHORT aImplTranslateKeyTab[KEY_TAB_SIZE] =
+{
+  // sal key code constant
+  KEY_A, /*   0 */
+  KEY_S,
+  KEY_D,
+  KEY_F,
+  KEY_H,
+  KEY_G,
+  KEY_Z,
+  KEY_X,
+  KEY_C,
+  KEY_V,
+  0, /*  10 */
+  KEY_B,
+  KEY_Q,
+  KEY_W,
+  KEY_E,
+  KEY_R,
+  KEY_Y,
+  KEY_T,
+  KEY_1,
+  KEY_2,
+  KEY_3, /*  20 */
+  KEY_4,
+  KEY_6,
+  KEY_5,
+  0,
+  KEY_9,
+  KEY_7,
+  0,
+  KEY_8,
+  KEY_0,
+  0, /*  30 */
+  KEY_O,
+  KEY_U,
+  0,
+  KEY_I,
+  KEY_P,
+  KEY_RETURN,
+  KEY_L,
+  KEY_J,
+  0,
+  KEY_K, /*  40 */
+  0,
+  0,
+  0,
+  0,
+  KEY_N,
+  KEY_M,
+  0,
+  KEY_TAB,
+  KEY_SPACE,
+  0, /*  50 */
+  KEY_BACKSPACE,
+  0,
+  KEY_ESCAPE,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0, /*  60 */
+  0,
+  0,
+  0,
+  0,
+  KEY_DECIMAL, /* ? Dot in numpad */
+  0,
+  0,
+  0,
+  0,
+  0, /*  70 */
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0, /*  80 */
+  0,
+  KEY_0,
+  KEY_1,
+  KEY_2,
+  KEY_3,
+  KEY_4,
+  KEY_5,
+  KEY_6,
+  KEY_7,
+  0, /*  90 */
+  KEY_8,
+  KEY_9,
+  0,
+  0,
+  0,
+  KEY_F5,
+  KEY_F6,
+  KEY_F7,
+  KEY_F3,
+  KEY_F8, /* 100 */
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0, /* 110 */
+  0,
+  0,
+  0,
+  KEY_INSERT,
+  KEY_HOME,
+  KEY_PAGEUP,
+  KEY_DELETE,
+  KEY_F3,
+  KEY_END,
+  KEY_F2, /*  120 */
+  KEY_PAGEDOWN,
+  KEY_F1,
+  KEY_LEFT,
+  KEY_RIGHT,
+  KEY_DOWN, /* 125 */
+  KEY_UP,   /* 126 */
+  0,
+  0,
+  0,
+  0 /*  130 */
+};
+
+OSStatus HandleKeyboardEvent(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void * inUserData)
+{
+    static ULONG nRepeatCount = 0;
+    UInt32 keyModifiers;
+    USHORT nModCode = 0;
+
+    ImplSalYieldMutexAcquire();
+
+    AquaSalFrame* pSalFrame = reinterpret_cast<AquaSalFrame*>(inUserData);
+
+    fprintf(stderr, "PJ: HandleKeyboardEvent\n");
+
+    UInt32 eventKind = GetEventKind(inEvent);
+
+    switch (eventKind) {
+    case kEventRawKeyUp:
+    case kEventRawKeyDown:
+    case kEventRawKeyRepeat:
+
+        if (eventKind == kEventRawKeyDown)
+            fprintf(stderr, "PJ: ... kEventRawKeyDown\n");
+        else if (eventKind == kEventRawKeyUp)
+            fprintf(stderr, "PJ: ... kEventRawKeyUp\n");
+        else if (eventKind == kEventRawKeyRepeat)
+            fprintf(stderr, "PJ: ... kEventRawKeyRepeat\n");
+
+        UInt32 keyCode, keyboardType;
+        char keyChar;
+
+        GetEventParameter (inEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(keyCode), NULL, &keyCode);
+        fprintf(stderr, "PJ: ...... keyCode = %d (%x)\n", keyCode, keyCode);
+
+        GetEventParameter (inEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(keyChar), NULL, &keyChar);
+        fprintf(stderr, "PJ: ...... keyChar = %c (%x)\n", keyChar, keyChar);
+
+        GetEventParameter (inEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(keyModifiers), NULL, &keyModifiers);
+        fprintf(stderr, "PJ: ...... keyModifiers = %d (%x)\n", keyModifiers, keyModifiers);
+
+        DbgPrintModifiers(keyModifiers);
+
+        GetEventParameter (inEvent, kEventParamKeyboardType, typeUInt32, NULL, sizeof(keyboardType), NULL, &keyboardType);
+        fprintf(stderr, "PJ: ...... keyboardType = %d (%x)\n", keyboardType, keyboardType);
+
+        SalKeyEvent aKeyEvt;
+
+        if ( (keyChar >= '0') && (keyChar <= '9') )
+            aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_NUM + keyChar - '0');
+        else if ( (keyChar >= 'A') && (keyChar <= 'Z') )
+            aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + keyChar - 'A');
+        else if ( (keyChar >= 'a') && (keyChar <= 'z') )
+            aKeyEvt.mnCode = sal::static_int_cast<USHORT>(KEYGROUP_ALPHA + keyChar - 'a');
+        else if ( keyChar == 0x0d )    // RETURN
+            aKeyEvt.mnCode = KEY_RETURN;
+        else if ( keyChar == 0x1b )    // ESCAPE
+            aKeyEvt.mnCode = KEY_ESCAPE;
+        else if ( keyChar == 0x09 )    // TAB
+            aKeyEvt.mnCode = KEY_TAB;
+        else if ( keyChar == 0x20 )    // SPACE
+            aKeyEvt.mnCode = KEY_SPACE;
+        else
+            aKeyEvt.mnCode = aImplTranslateKeyTab[keyCode];
+
+        aKeyEvt.mnCharCode = keyChar;
+
+        // Set modifiers
+        // FIXME: how to map them? shift, option, control and command!
+        if (keyModifiers & shiftKey)
+            nModCode |= KEY_SHIFT;
+        if (keyModifiers & controlKey)
+            nModCode |= KEY_MOD1;
+        if (keyModifiers & optionKey)
+            nModCode |= KEY_MOD2;
+
+        aKeyEvt.mnCode |= nModCode;
+        aKeyEvt.mnTime = static_cast<ULONG>(GetEventTime(inEvent) * 1000);
+
+        if (eventKind == kEventRawKeyRepeat)
+            aKeyEvt.mnRepeat = nRepeatCount++;
+        else
+            // Not repeat event -> reset repeat counter
+            nRepeatCount = 0;
+
+        if (eventKind == kEventRawKeyDown || eventKind == kEventRawKeyRepeat)
+            pSalFrame->CallCallback( SALEVENT_KEYINPUT, &aKeyEvt );
+        if (eventKind == kEventRawKeyUp)
+            pSalFrame->CallCallback( SALEVENT_KEYUP, &aKeyEvt );
+
+        break;
+
+    case kEventRawKeyModifiersChanged:
+        fprintf(stderr, "PJ: ... kEventRawKeyModifiersChanged\n");
+
+        GetEventParameter (inEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(keyModifiers), NULL, &keyModifiers);
+        fprintf(stderr, "PJ: ...... keyModifiers = %d (%x)\n", keyModifiers, keyModifiers);
+
+        DbgPrintModifiers(keyModifiers);
+
+        // FIXME: send KEYMODCHANGE event...
+
+        break;
+
+    default:
+        fprintf(stderr, "PJ: ... UNKNOWN!!!\n");
+    }
+
+    ImplSalYieldMutexRelease();
+
+  return noErr;
+}
+
 OSStatus GetOptimalWindowSize(Rect* rect);
 
 void DbgWhichSalFrameStyle(ULONG style)
@@ -1332,6 +1600,11 @@
     InstallAndRegisterEventHandler(NewEventHandlerUPP(HandleMenuPopulateEvent), 1, &cMenuPopulateEvent);
     InstallAndRegisterEventHandler(NewEventHandlerUPP(HandleMenuClosedEvent), 1, &cMenuClosedEvent);
     InstallAndRegisterEventHandler(NewEventHandlerUPP(HandleMenuTargetItemEvent), 1, &cMenuTargetItemEvent);
+
+    /* Keyboard event handlers*/
+
+    InstallAndRegisterEventHandler(NewEventHandlerUPP(HandleKeyboardEvent), GetEventTypeCount(cKeyboardRawKeyEvents), cKeyboardRawKeyEvents);
+
 }
 
 OSStatus AquaSalFrame::InstallAndRegisterEventHandler(EventHandlerUPP upp, size_t nEvents, const EventTypeSpec* eventSpec)
