[win32k]
authorGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 17 Apr 2011 10:38:06 +0000 (10:38 +0000)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 17 Apr 2011 10:38:06 +0000 (10:38 +0000)
- Do not distinguish left and right keys in WH_KEYBOARD and key messages. Based on wine
Fixes several tests

svn path=/trunk/; revision=51377

reactos/subsystems/win32/win32k/ntuser/msgqueue.c

index f5f678d..136efff 100644 (file)
@@ -1307,6 +1307,23 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages)
 {
     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;
+        }
+    }
+
     Event.message = Msg->message;
     Event.hwnd    = Msg->hwnd;
     Event.time    = Msg->time;