Commit 8dac79d3 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Add few special cases for key mappings.

parent 392537bb
...@@ -87,11 +87,17 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM ...@@ -87,11 +87,17 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
TRACE("(%p) %ld,%ld\n", iface, wparam, lparam); TRACE("(%p) %ld,%ld\n", iface, wparam, lparam);
dik_code = map_dik_code(hook->scanCode & 0xff,hook->vkCode); switch (hook->vkCode)
/* R-Shift is special - it is an extended key with separate scan code */ {
if (hook->flags & LLKHF_EXTENDED && dik_code != 0x36) /* R-Shift is special - it is an extended key with separate scan code */
dik_code |= 0x80; 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; new_diks = hook->flags & LLKHF_UP ? 0 : 0x80;
/* returns now if key event already known */ /* returns now if key event already known */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment