Microsoft PowerToys version
0.98.1
Installation method
WinGet
Running as admin
No
Area(s) with issue?
Keyboard Manager
Steps to reproduce
- Configure a global shortcut remap that uses Left Ctrl as a modifier (e.g. LCtrl+Y → Backspace)
- Press and release AltGr (Right Alt) at any time without triggering a shortcut remap — for example, just tap AltGr while in a text editor, or type an AltGr character like
@ on a German keyboard layout
- Now press LCtrl+Y to trigger the configured shortcut
✅ Expected behavior
The shortcut fires and Ctrl is properly released after the shortcut completes. Subsequent keyboard input works normally.
❌ Actual behavior
After step 2, the LCtrl key becomes permanently stuck. The shortcut remap stops cleaning up properly — Ctrl appears held down even after releasing all keys. All subsequent key presses behave as if Ctrl is held. The only workaround is to restart the Keyboard Manager module.
Root cause
In KeyboardEventHandlers.cpp, the static bool isAltRightKeyInvoked flag (line 303) is set to true when AltGr is pressed (RAlt while LCtrl is held), but it is only reset inside Case 1's else branch (lines 653, 677), which requires isShortcutInvoked == true. If AltGr is pressed and released when no shortcut is active, the flag stays true permanently.
Once the flag is stale:
- Modifier key restoration is skipped at 13 locations (all guarded by
if (!isAltRightKeyInvoked))
- Shortcut state (
isShortcutInvoked) is never reset
- LCtrl key-up events are consumed by a
break statement (line 620-622) instead of being properly handled
This affects any shortcut remap that uses LCtrl as a modifier, since the line 620 guard specifically checks for VK_LCONTROL.
Other Software
None relevant — this is reproducible with just Keyboard Manager and any keyboard layout that has an AltGr key (or by pressing Right Alt on any layout).
Microsoft PowerToys version
0.98.1
Installation method
WinGet
Running as admin
No
Area(s) with issue?
Keyboard Manager
Steps to reproduce
@on a German keyboard layout✅ Expected behavior
The shortcut fires and Ctrl is properly released after the shortcut completes. Subsequent keyboard input works normally.
❌ Actual behavior
After step 2, the LCtrl key becomes permanently stuck. The shortcut remap stops cleaning up properly — Ctrl appears held down even after releasing all keys. All subsequent key presses behave as if Ctrl is held. The only workaround is to restart the Keyboard Manager module.
Root cause
In
KeyboardEventHandlers.cpp, thestatic bool isAltRightKeyInvokedflag (line 303) is set totruewhen AltGr is pressed (RAlt while LCtrl is held), but it is only reset inside Case 1's else branch (lines 653, 677), which requiresisShortcutInvoked == true. If AltGr is pressed and released when no shortcut is active, the flag staystruepermanently.Once the flag is stale:
if (!isAltRightKeyInvoked))isShortcutInvoked) is never resetbreakstatement (line 620-622) instead of being properly handledThis affects any shortcut remap that uses LCtrl as a modifier, since the line 620 guard specifically checks for
VK_LCONTROL.Other Software
None relevant — this is reproducible with just Keyboard Manager and any keyboard layout that has an AltGr key (or by pressing Right Alt on any layout).