cpython
cpython copied to clipboard
gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl
Added missing keybindings for Ctrl+← and Ctrl+→ in reader.py
.
These should map to ctrl left
and ctrl right
but, as Tomas mentioned in #119035, those are treated as invalid characters by the keymap translator. This is due to an incorrect assumption that Ctrl can only be combined with a single character, so the logic in keymap.py
needs a small change too.
As far as I can tell, "left" and "right" are the only only multi-character keynames that we need to map, so I've just added an explicit check for those two.
P.S. first-time contributor at PyCon US! Lmk if I've missed any steps in creating the PR.
- Issue: gh-119035