user32: Properly translate keyboard left/right-shift, alt, ctrl keys hardware messages.
authorVitaliy Margolen <vitaliy@kievinfo.com>
Sat, 29 Mar 2008 16:11:24 +0000 (10:11 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 31 Mar 2008 13:13:06 +0000 (15:13 +0200)
dlls/user32/message.c

index ed5a2a81685ee5b0c46f832563542bb1903a85fb..cc2603f7ac1a9d01f1c88e65302646148b7aece8 100644 (file)
@@ -1683,6 +1683,21 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
 {
     EVENTMSG event;
 
+    if (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN ||
+        msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP)
+        switch (msg->wParam)
+        {
+            case VK_LSHIFT: case VK_RSHIFT:
+                msg->wParam = VK_SHIFT;
+                break;
+            case VK_LCONTROL: case VK_RCONTROL:
+                msg->wParam = VK_CONTROL;
+                break;
+            case VK_LMENU: case VK_RMENU:
+                msg->wParam = VK_MENU;
+                break;
+        }
+
     /* FIXME: is this really the right place for this hook? */
     event.message = msg->message;
     event.hwnd    = msg->hwnd;