gh-56596: Make IDLE key bindings work with Caps Lock on - #157709
Conversation
Tk does not fold the case of letter keysyms, and Caps Lock changes it, so bind each key sequence with the other case of its letters too.
|
When you're done making the requested changes, leave the comment: |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
Thanks @serhiy-storchaka for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
Sorry, @serhiy-storchaka and @terryjreedy, I could not cleanly backport this to |
|
GH-157738 is a backport of this pull request to the 3.14 branch. |
|
GH-157739 is a backport of this pull request to the 3.13 branch. |
|
@serhiy-storchaka CAPS LOCK: Merge conflict only on 3.15 backport. 3.14 and 3.13 on automerge. |
…7709) (#157739) gh-56596: Make IDLE key bindings work with Caps Lock on (GH-157709) Tk does not fold the case of letter keysyms, and Caps Lock changes it, so bind each key sequence with the other case of its letters too. --------- (cherry picked from commit 0b18efd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…7709) (#157738) gh-56596: Make IDLE key bindings work with Caps Lock on (GH-157709) Tk does not fold the case of letter keysyms, and Caps Lock changes it, so bind each key sequence with the other case of its letters too. --------- (cherry picked from commit 0b18efd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
I think it depends on one of other not merged backports. |
|
I realized that a few hours ago. I added a draft 'Make 3.15 backport` issue, in sequence, pointing to this PR. This itself is 'Done' and hidden by default. |
Tk does not fold the case of letter keysyms, and Caps Lock changes it: with Caps Lock on, Ctrl+S produces the keysym
S, which<Control-Key-s>does not match.EditorWindow.apply_bindings()now also binds each key sequence with the case of its letters swapped, for core and extension bindings on all platforms. The keysets themselves, the Settings dialog and the menu accelerators are unchanged.An explicit Shift binding such as
<Control-Shift-Key-S>is more specific than the added<Control-Key-S>, so it still wins. Supersedes #32245, which did the same inGetCurrentKeySet()but removed a test and duplicated the Windows bindings.🤖 Generated with Claude Code