gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new repl
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.
- Issue: gh-119035
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.
Thanks @optim-ally for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. 🐍🍒⛏🤖
GH-119323 is a backport of this pull request to the 3.13 branch.
Thank you @optim-ally and congrats on your first commit to Python :)