cpython/Lib/_pyrepl
Miss Islington (bot) 4c6318e24d
[3.13] gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389) (GH-130500)
gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389)

Fix `Lib/_pyrepl/windows_console.py` to support more keybindings, like the
`Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings and those with meta (i.e. Alt),
e.g. to `kill-word` or `backward-kill-word`.

Specifics: if Ctrl is pressed, emit "ctrl left" and "ctrl right" instead of just "left" or
"right," and if Meta/Alt is pressed, emit the special key code for meta before
emitting the other key that was pressed.
(cherry picked from commit 688f3a0d4b)

Co-authored-by: Paulie Peña <203125+paulie4@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2025-03-03 16:57:53 +01:00
..
__init__.py
__main__.py [3.13] gh-120678: pyrepl: Include globals from modules passed with -i (GH-120904) (#121916) 2024-07-17 16:52:46 +02:00
_minimal_curses.py [3.13] gh-126456: Fix _pyrepl curses tigetstr() (GH-126472) (#126790) 2024-11-13 17:19:03 +00:00
_threading_handler.py [3.13] gh-120221: Support KeyboardInterrupt in asyncio REPL (GH-123795) (#123799) 2024-09-06 22:25:19 +02:00
commands.py [3.13] gh-118878: Pyrepl: show completions menu below the current line (GH-118939) (#129161) 2025-01-23 22:15:27 +01:00
completing_reader.py [3.13] gh-118878: Pyrepl: show completions menu below the current line (GH-118939) (#129161) 2025-01-23 22:15:27 +01:00
console.py [3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155) 2025-01-21 22:15:57 +00:00
curses.py
fancy_termios.py [3.13] gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (#129233) 2025-01-23 17:55:28 +00:00
historical_reader.py [3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155) 2025-01-21 22:15:57 +00:00
input.py
keymap.py
main.py [3.13] gh-121957: Emit audit events for python -i and python -m asyncio (GH-121958) (GH-122115) 2024-07-22 13:36:57 +02:00
mypy.ini
pager.py [3.13] Support the "pager" binary in _pyrepl (GH-122878) (#124242) 2024-10-07 23:45:43 +02:00
reader.py [3.13] gh-127349: Add check for correct resizing in REPL (GH-127387) (#129485) 2025-02-04 15:18:22 +01:00
readline.py [3.13] gh-122273: Support PyREPL history on Windows (#127141) (#127289) 2024-11-26 11:17:13 +00:00
simple_interact.py [3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155) 2025-01-21 22:15:57 +00:00
trace.py
types.py
unix_console.py [3.13] gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid value (GH-128653) (#129186) 2025-01-22 16:38:13 +00:00
unix_eventqueue.py
utils.py [3.13] gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650) (#129154) 2025-01-21 21:04:41 +00:00
windows_console.py [3.13] gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH-128389) (GH-130500) 2025-03-03 16:57:53 +01:00