Skip to content
Prev Previous commit
Next Next commit
Lib/_pyrepl/windows_console.py: standardize Ctrl+special key
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
  • Loading branch information
paulie4 and eendebakpt authored Jan 5, 2025
commit 55e4fbff85403812b886d02206a5176e43d0a7bb
2 changes: 1 addition & 1 deletion Lib/_pyrepl/windows_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get_event(self, block: bool = True) -> Event | None:
# Handle special keys like arrow keys and translate them into the appropriate command
key = VK_MAP.get(key_event.wVirtualKeyCode)
if key:
if key in ("left", "right") and key_event.dwControlKeyState & CTRL_ACTIVE:
if key_event.dwControlKeyState & CTRL_ACTIVE:
key = f"ctrl {key}"
elif key_event.dwControlKeyState & ALT_ACTIVE:
# queue the key, return the meta command
Expand Down