Skip to content

Conversation

@optim-ally
Copy link
Contributor

@optim-allyoptim-ally commented May 20, 2024

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.

@ghost
Copy link

ghost commented May 20, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

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 skip news label instead.

Copy link
Member

@lysnikolaoulysnikolaou left a 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!

@ambvambv merged commit 0398d93 into python:mainMay 21, 2024
@lysnikolaoulysnikolaou added the needs backport to 3.13 bugs and security fixes label May 21, 2024
@miss-islington-app
Copy link

Thanks @optim-ally for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2024
…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>
@bedevere-app
Copy link

GH-119323 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and security fixes label May 21, 2024
@hroncok
Copy link
Contributor

Thank you @optim-ally and congrats on your first commit to Python :)

@optim-allyoptim-ally deleted the repl-word-skipping branch May 21, 2024 20:20
lysnikolaou pushed a commit that referenced this pull request May 21, 2024
…new repl (GH-119248) (#119323) add word-skipping ctrl keybindings to new repl (cherry picked from commit 0398d93) Co-authored-by: Alastair Stanley <alastairstanley@ntlworld.com>
@JelleZijlstraJelleZijlstra mentioned this pull request May 28, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstopic-replRelated to the interactive shell

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@optim-ally@hroncok@lysnikolaou@ambv