-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Python 3.13.0b1 REPL does not travel words when pressing Ctrl+← or Ctrl+→ #119035
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Comments
Eclips4
added
topic-repl
Related to the interactive shell
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
labels
May 14, 2024
It seems that Ctrl+← is converted into diff --git a/Lib/_pyrepl/input.py b/Lib/_pyrepl/input.py
index 21c24eb5cd..0b804e9252 100644
--- a/Lib/_pyrepl/input.py
+++ b/Lib/_pyrepl/input.py
@@ -61,6 +61,8 @@ def empty(self) -> bool:
class KeymapTranslator(InputTranslator):
def __init__(self, keymap, verbose=False, invalid_cls=None, character_cls=None):
self.verbose = verbose
from .keymap import compile_keymap, parse_keys
@@ -73,7 +75,14 @@ def __init__(self, keymap, verbose=False, invalid_cls=None, character_cls=None):
d[keyseq] = command
if self.verbose:
print(d)
self.k = self.ck = compile_keymap(d, ())
+ self.k['ctrl left'] = 'backward-word'
+ self.k['ctrl right'] = 'forward-word'
self.results = deque() |
See #119034 (comment) for a list of things we will be implementing as additional keyboard mappings. |
ambv
pushed a commit
that referenced
this issue
May 21, 2024
#119248) add word-skipping ctrl keybindings to new repl
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
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>
lysnikolaou
pushed a commit
that referenced
this issue
May 21, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
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
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When I type this to older Python REPLs:
And I press Ctrl+←, my cursor moves in front of
w
. I can press Ctrl+← again to go in front of thet
etc. I can then press Ctrl+→ to travel the words in the other direction. My bash behaves the same. Again, I don't know if this is Fedora's configuration of readline, or the default.In Python 3.13.0b1 REPL, this no longer works. Pressing Ctrl+← or Ctrl+→ seemingly does nothing.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: