Skip to content

Conversation

optim-ally
Copy link
Contributor

@optim-ally optim-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

bedevere-app bot commented May 20, 2024

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

@lysnikolaou lysnikolaou 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!

@ambv ambv merged commit 0398d93 into python:main May 21, 2024
@lysnikolaou lysnikolaou 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 <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 21, 2024

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

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

hroncok commented May 21, 2024

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

@optim-ally optim-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 <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ew repl (python#119248)

add word-skipping ctrl keybindings to new repl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news topic-repl Related to the interactive shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants