You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pyrepl on Windows: add Ctrl+← and Ctrl+→ word-skipping and other keybindings #128388
Currently, _pyrepl/windows_console.py is very limited compared to _pyrepl/unix_console.py, for example, it doesn't support the Ctrl+← and Ctrl+→ word-skipping keybindings (see also #119248) nor any of the keybindings that use meta (i.e. Alt), e.g. to kill-word or backward-kill-word.
This is extra-annoying given the fact that the previous Python REPL did support Ctrl+←andCtrl+→` word-skipping keybindings in Windows, i.e. before pyrepl was used for Python 3.13.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Considering this is one of the reasons that I disable the new REPL entirely, it might be justifiable to treat this as a bug?
I don't particularly mind not having the new REPL, which is why I haven't spent the time to try and fix it. But you could argue that it's not fit for purpose if I'm just turning the whole thing off.
I'm sure there are many of us that use Ctrl+Backspace in Windows and have come to expect that to delete a word, and since that used to work in Python REPL but no longer does, that's why it is a regression and therefore feels like it should be considered a bug. In fact, I can't think of a single application in Windows that I use that doesn't support Ctrl+Backspace to delete a word (besides the new Python 3.13+ REPL).
Yes, please! It would be great if this fix goes into both Python 3.14.x and 3.13.x. BTW, the single code file that was edited in #128389 has the exact same code in the main and 3.13 branches, so backporting should be very easy.
Yeah, I think clear regressions in user-visible behaviour in the interactive interpreter are worth considering for backport. Whether they're suitable depends on how invasive and risky the changes are. The fix for this issue seems fine to backport to me.
Activity
zooba commentedon Jan 1, 2025
Considering this is one of the reasons that I disable the new REPL entirely, it might be justifiable to treat this as a bug?
I don't particularly mind not having the new REPL, which is why I haven't spent the time to try and fix it. But you could argue that it's not fit for purpose if I'm just turning the whole thing off.
gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindings (GH…
encukou commentedon Jan 10, 2025
To me this sounds very much like a new feature.
Do you want to ask the RM for an exception to backport it?
paulie4 commentedon Jan 10, 2025
I'm sure there are many of us that use
Ctrl+Backspacein Windows and have come to expect that to delete a word, and since that used to work in Python REPL but no longer does, that's why it is a regression and therefore feels like it should be considered a bug. In fact, I can't think of a single application in Windows that I use that doesn't supportCtrl+Backspaceto delete a word (besides the new Python 3.13+ REPL).Yes, please! It would be great if this fix goes into both Python 3.14.x and 3.13.x. BTW, the single code file that was edited in #128389 has the exact same code in the
mainand3.13branches, so backporting should be very easy.zooba commentedon Jan 10, 2025
I agree it's a regression. When disabling the feature adds functionality, it's hard to call that functionality "new".
paulie4 commentedon Feb 2, 2025
@encukou, any chance this could get into a 3.13.x release?
encukou commentedon Feb 3, 2025
IMO, that's a question for the release manager. @Yhg1s?
It might need some kind of a blanket decision, there are several more issues that might be classified as regressions.
Yhg1s commentedon Feb 3, 2025
Yeah, I think clear regressions in user-visible behaviour in the interactive interpreter are worth considering for backport. Whether they're suitable depends on how invasive and risky the changes are. The fix for this issue seems fine to backport to me.
pythongh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindin…
[3.13] gh-128388: pyrepl on Windows: add meta and ctrl+arrow keybindi…
encukou commentedon Mar 3, 2025
Thank you for the fix, @paulie4!