Skip to content

Commit e3f6438

Browse files
committed
PR suggestions
1 parent 16f2a13 commit e3f6438

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/_pyrepl/windows_console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def get_event(self, block: bool = True) -> Event | None:
425425
# Handle special keys like arrow keys and translate them into the appropriate command
426426
code = VK_MAP.get(key_event.wVirtualKeyCode)
427427
if code:
428-
if code in ("left", "right") and (ctrlstate := key_event.dwControlKeyState) and ctrlstate & CTRL_OR_ALT_ACTIVE:
428+
if code in ("left", "right") and key_event.dwControlKeyState & CTRL_OR_ALT_ACTIVE:
429429
code = f"ctrl {code}"
430430
return Event(evt="key", data=code, raw=key)
431431
if block:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fix :source:`Lib/_pyrepl/windows_console.py` to support more keybindings, like the :kbd:`Control-` and :kbd:`Control-` word-skipping keybindings and those with meta (i.e. Alt), e.g. to ``kill-word`` or ``backward-kill-word``.
1+
Fix ``PyREPL`` on Windows to support more keybindings, like the :kbd:`Control-` and :kbd:`Control-` word-skipping keybindings and those with meta (i.e. :kbd:`Alt`), e.g. :kbd:`Alt-d` to ``kill-word`` or :kbd:`Alt-Backspace` ``backward-kill-word``.

0 commit comments

Comments
 (0)