Index: dll/keyboard/kbdus/kbdus.c =================================================================== --- dll/keyboard/kbdus/kbdus.c (revision 75615) +++ dll/keyboard/kbdus/kbdus.c (working copy) @@ -146,7 +146,7 @@ }; ROSDATA VSC_VK extcode1_to_vk[] = { - { 0x1d, VK_PAUSE }, + { 0x45, VK_PAUSE }, { 0, 0 }, }; Index: win32ss/user/ntuser/input.c =================================================================== --- win32ss/user/ntuser/input.c (revision 75615) +++ win32ss/user/ntuser/input.c (working copy) @@ -136,7 +136,7 @@ KWAIT_BLOCK WaitBlockArray[RTL_NUMBER_OF(WaitObjects)]; ULONG cWaitObjects = 0, cMaxWaitObjects = 2; MOUSE_INPUT_DATA MouseInput; - KEYBOARD_INPUT_DATA KeyInput; + KEYBOARD_INPUT_DATA KeyInput, PrevKeyInput; PVOID ShutdownEvent; ByteOffset.QuadPart = (LONGLONG)0; @@ -302,6 +302,19 @@ /* Set LastInputTick */ IntLastInputTick(TRUE); + /* Special treatment for Num Lock which has a multi byte scan code e1 1d 45 e1 9d c5 + which results in recieving two distinct keypresses 1d (left control) and 45 (num lock). + We skip the first key and add E1 flag to the second one so it gets properly translated to VK_PAUSE. + */ + if (KeyInput.MakeCode == 0x45 && PrevKeyInput.MakeCode == 0x1D && (PrevKeyInput.Flags & KEY_E1)) + KeyInput.Flags |= KEY_E1; + + PrevKeyInput.MakeCode = KeyInput.MakeCode; + PrevKeyInput.Flags = KeyInput.Flags; + + if (KeyInput.MakeCode == 0x1D && (KeyInput.Flags & KEY_E1)) + continue; + /* Process data */ UserEnterExclusive(); UserProcessKeyboardInput(&KeyInput); Index: win32ss/user/ntuser/keyboard.c =================================================================== --- win32ss/user/ntuser/keyboard.c (revision 75615) +++ win32ss/user/ntuser/keyboard.c (working copy) @@ -121,6 +121,9 @@ case VK_CAPITAL: LedFlag = KEYBOARD_CAPS_LOCK_ON; break; case VK_NUMLOCK: LedFlag = KEYBOARD_NUM_LOCK_ON; break; case VK_SCROLL: LedFlag = KEYBOARD_SCROLL_LOCK_ON; break; + /* Pause/Break has the same scan code as num/scroll lock so don't update the LEDs in this case */ + case VK_PAUSE: break; + case VK_CANCEL: break; default: for (i = 0; i < gpKeyboardIndicatorTrans->NumberOfIndicatorKeys; i++) { @@ -1071,7 +1074,7 @@ Note: We could call UserSendKeyboardInput using scan code, but it wouldn't interpret E1 key(s) properly */ wVk = IntVscToVk(wScanCode, pKbdTbl); - TRACE("UserProcessKeyboardInput: %x (break: %u) -> %x\n", + ERR("UserProcessKeyboardInput: %x (break: %u) -> %x\n", wScanCode, (pKbdInputData->Flags & KEY_BREAK) ? 1u : 0, wVk); if (wVk)