Vitaliy Margolen : user32: Properly translate keyboard left/right-shift, alt, ctrl keys hardware messages.

Alexandre Julliard julliard at winehq.org
Mon Mar 31 09:15:39 CDT 2008


Module: wine
Branch: master
Commit: a28b86a78e0ac7db4a20f1e4cba20c4cf987c0dc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a28b86a78e0ac7db4a20f1e4cba20c4cf987c0dc

Author: Vitaliy Margolen <vitaliy at kievinfo.com>
Date:   Sat Mar 29 10:11:24 2008 -0600

user32: Properly translate keyboard left/right-shift, alt, ctrl keys hardware messages.

---

 dlls/user32/message.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/message.c b/dlls/user32/message.c
index ed5a2a8..cc2603f 100644
--- a/dlls/user32/message.c
+++ b/dlls/user32/message.c
@@ -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;




More information about the wine-cvs mailing list