while (pRet)
{
- Status = NtDeviceIoControlFile(hKeyboardDevice,
+ Status = ZwDeviceIoControlFile(hKeyboardDevice,
NULL,
NULL,
NULL,
NTSTATUS APIENTRY
IntKeyboardUpdateLeds(HANDLE hKeyboardDevice,
WORD wVk,
- WORD wScanCode,
- BOOL bEnabled)
+ WORD wScanCode)
{
NTSTATUS Status;
UINT i;
if (LedFlag)
{
- if (bEnabled)
- gIndicators.LedFlags |= LedFlag;
- else
- gIndicators.LedFlags = ~LedFlag;
+ gIndicators.LedFlags ^= LedFlag;
/* Update the lights on the hardware */
- Status = NtDeviceIoControlFile(hKeyboardDevice,
+ Status = ZwDeviceIoControlFile(hKeyboardDevice,
NULL,
NULL,
NULL,
{
NTSTATUS Status;
IO_STATUS_BLOCK Block;
-/*
+
IntKeyboardGetIndicatorTrans(hKeyboardDevice, &gpKeyboardIndicatorTrans);
- Status = NtDeviceIoControlFile(hKeyboardDevice,
+ Status = ZwDeviceIoControlFile(hKeyboardDevice,
NULL,
NULL,
NULL,
gIndicators.LedFlags & KEYBOARD_NUM_LOCK_ON);
SET_KEY_LOCKED(gafAsyncKeyState, VK_SCROLL,
gIndicators.LedFlags & KEYBOARD_SCROLL_LOCK_ON);
-*/
+
// FIXME: Need device driver to work! HID support more than one!!!!
- Status = NtDeviceIoControlFile(hKeyboardDevice,
+ Status = ZwDeviceIoControlFile(hKeyboardDevice,
NULL,
NULL,
NULL,
{
ERR("NtDeviceIoControlFile() failed, ignored\n");
}
- ERR("Keyboard type %d, subtype %d and number of func keys %d\n",
+ TRACE("Keyboard type %d, subtype %d and number of func keys %d\n",
gKeyboardInfo.KeyboardIdentifier.Type,
gKeyboardInfo.KeyboardIdentifier.Subtype,
gKeyboardInfo.NumberOfFunctionKeys);
/* Update keyboard LEDs */
IntKeyboardUpdateLeds(ghKeyboardDevice,
wSimpleVk,
- wScanCode,
- IS_KEY_LOCKED(gafAsyncKeyState, wSimpleVk));
+ wScanCode);
}
/* Call WH_KEYBOARD_LL hook */
TRACE("HotKey Processed\n");
bPostMsg = FALSE;
}
-
+
wFixedVk = IntFixVk(wSimpleVk, bExt); /* LSHIFT + EXT = RSHIFT */
if (wSimpleVk == VK_SHIFT) /* shift can't be extended */
bExt = FALSE;
Msg.lParam |= KF_MENUMODE << 16;
}
+ // Post mouse move before posting key buttons, to keep it syned.
+ if (pFocusQueue->QF_flags & QF_MOUSEMOVED)
+ {
+ IntCoalesceMouseMove(pti);
+ }
+
/* Post a keyboard message */
TRACE("Posting keyboard msg %u wParam 0x%x lParam 0x%x\n", Msg.message, Msg.wParam, Msg.lParam);
if (!Wnd) {ERR("Window is NULL\n");}
- MsqPostMessage(pti, &Msg, TRUE, QS_KEY, 0);
+ MsqPostMessage(pti, &Msg, TRUE, QS_KEY, 0, dwExtraInfo);
}
return TRUE;
NewMsg.message = (lpMsg->message == WM_KEYDOWN) ? WM_CHAR : WM_SYSCHAR;
NewMsg.wParam = HIWORD(lpMsg->lParam);
NewMsg.lParam = LOWORD(lpMsg->lParam);
- MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0);
+ MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0, 0);
return TRUE;
}
{
TRACE("Msg: %x '%lc' (%04x) %08x\n", NewMsg.message, wch[i], wch[i], NewMsg.lParam);
NewMsg.wParam = wch[i];
- MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0);
+ MsqPostMessage(pti, &NewMsg, FALSE, QS_KEY, 0, 0);
}
bResult = TRUE;
}