← 返回首页
gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl by optim-ally · Pull Request #119248 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl#119248

Merged
ambv merged 1 commit into
python:mainfrom
optim-ally:repl-word-skipping
May 21, 2024
Merged

gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl#119248
ambv merged 1 commit into
python:mainfrom
optim-ally:repl-word-skipping

Conversation

optim-ally commented May 20, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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 commented May 20, 2024
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

bedevere-app Bot commented May 20, 2024

Copy link
Copy Markdown

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.

lysnikolaou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM! Thanks @optim-ally!

ambv merged commit 0398d93 into python:main May 21, 2024
lysnikolaou added the needs backport to 3.13 bugs and security fixes label May 21, 2024

Copy link
Copy Markdown

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 Bot commented May 21, 2024

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 21, 2024

hroncok commented May 21, 2024

Copy link
Copy Markdown
Contributor

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

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 <alastairstanley@ntlworld.com>
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.