Repository navigation
input(feat[keys]): Add F13-F35 and modifier keys - #212
Merged
Merged
Conversation
why: Programs enabling Kitty REPORT_ALL_KEYS or binding extended function keys could not construct or encode f13-f35 or left/right modifier-only KeyEvent instances without raising ValueError. what: - Add canonical f13-f35 mappings (xterm CSI ~ legacy fallback and Kitty 57376-57398 CSI u when enhanced) and left/right modifier-only keys (shift_left through meta_right, emitting Kitty 57441-57452 only under REPORT_ALL_KEYS and b"" otherwise) in src/libvt/input.py. - Add unit tests in tests/test_input.py, doctested docs in docs/topics/protocols-and-input.md, and a CHANGES entry. Fixes #129
35 of 38 tasks
This branch was successfully deployed
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add extended function keys (
f13–f35) and left/right modifier-only keys (shift_leftthroughmeta_right) tolibvt.input._encode_key.Changes
f13–f35as Kitty functionalCSI ucodepoints57376–57398whenDISAMBIGUATE,REPORT_EVENT_TYPES, orREPORT_ALL_KEYSis active, and as xterm tilde sequences (25, 26, 28, 29, 31–34, 42–56~) otherwise.shift_left/ctrl_left/alt_left/super_left/hyper_left/meta_leftand their_rightcounterparts as Kitty57441–57452strictly underREPORT_ALL_KEYS, returningb""otherwise.docs/topics/protocols-and-input.md, and aCHANGESentry.Fixes #129