-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl #119248
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @optim-ally!
Thanks @optim-ally for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ew repl (pythonGH-119248) add word-skipping ctrl keybindings to new repl (cherry picked from commit 0398d93) Co-authored-by: Alastair Stanley <alastairstanley@ntlworld.com>
GH-119323 is a backport of this pull request to the 3.13 branch. |
Thank you @optim-ally and congrats on your first commit to Python :) |
…ew repl (python#119248) add word-skipping ctrl keybindings to new repl
Added missing keybindings for Ctrl+← and Ctrl+→ in
reader.py
.These should map to
ctrl left
andctrl 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 inkeymap.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.