Vitaliy Margolen : dinput: Add few special cases for key mappings.

Alexandre Julliard julliard at winehq.org
Tue Mar 3 11:53:40 CST 2009


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

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Fri Feb 27 09:20:08 2009 -0700

dinput: Add few special cases for key mappings.

---

 dlls/dinput/keyboard.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
index f9c689b..de8c63c 100644
--- a/dlls/dinput/keyboard.c
+++ b/dlls/dinput/keyboard.c
@@ -87,11 +87,17 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
 
     TRACE("(%p) %ld,%ld\n", iface, wparam, lparam);
 
-    dik_code = map_dik_code(hook->scanCode & 0xff,hook->vkCode);
-    /* R-Shift is special - it is an extended key with separate scan code */
-    if (hook->flags & LLKHF_EXTENDED && dik_code != 0x36)
-        dik_code |= 0x80;
-
+    switch (hook->vkCode)
+    {
+        /* R-Shift is special - it is an extended key with separate scan code */
+        case VK_RSHIFT  : dik_code = DIK_RSHIFT; break;
+        case VK_PAUSE   : dik_code = DIK_PAUSE; break;
+        case VK_NUMLOCK : dik_code = DIK_NUMLOCK; break;
+        case VK_SUBTRACT: dik_code = DIK_SUBTRACT; break;
+        default:
+            dik_code = map_dik_code(hook->scanCode & 0xff, hook->vkCode);
+            if (hook->flags & LLKHF_EXTENDED) dik_code |= 0x80;
+    }
     new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;
 
     /* returns now if key event already known */




More information about the wine-cvs mailing list