Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 77 of file keyboard.c.
Referenced by alloc_device().
{ SysKeyboardImpl *This = (SysKeyboardImpl *)iface; int dik_code; KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam; BYTE new_diks; if (wparam != WM_KEYDOWN && wparam != WM_KEYUP && wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP) return; 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; new_diks = hook->flags & LLKHF_UP ? 0 : 0x80; /* returns now if key event already known */ if (new_diks == This->DInputKeyState[dik_code]) return; This->DInputKeyState[dik_code] = new_diks; TRACE(" setting %02X to %02X\n", dik_code, This->DInputKeyState[dik_code]); dik_code = id_to_offset(&This->base.data_format, DIDFT_MAKEINSTANCE(dik_code) | DIDFT_PSHBUTTON); EnterCriticalSection(&This->base.crit); queue_event((LPDIRECTINPUTDEVICE8A)This, dik_code, new_diks, hook->time, This->base.dinput->evsequence++); LeaveCriticalSection(&This->base.crit); }