fix(input): decode kitty key events with event type suffix for all keys - #532
Open
adi-IL wants to merge 1 commit into
Open
fix(input): decode kitty key events with event type suffix for all keys#532adi-IL wants to merge 1 commit into
adi-IL wants to merge 1 commit into
Conversation
When terminals using the Kitty progressive keyboard protocol report key events with an event-type suffix (such as press :1, repeat :2, or release :3 in ESC[<keycode>;<modifiers>:<event_type>u), the parser previously matched only keycode 27 (Escape). As a result, colon-qualified event reports for other keys (such as Backspace 127, Enter 13, and Tab 9 sent by terminals like Ghostty) were dropped. Generalize the event type decoding stage: - Store the keycode in param2 and pack raw modifiers into the upper bits of param before transitioning to the event type stage. - Dispatch press (1) and repeat (2) actions through kittyUnicodeKeyAction for all keycodes, while ignoring release events (3).
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.
When terminals implementing the Kitty progressive keyboard protocol report key events with an event-type suffix (such as press
:1, repeat:2, or release:3inESC[<keycode>;<modifiers>:<event_type>u), the escape parser previously matched only keycode 27 (Escape).As a result, colon-qualified event reports for other keys (such as Backspace 127, Enter 13, and Tab 9 emitted by terminals like Ghostty) were dropped as unhandled sequences.
This change:
param2and packs modifiers inparamacross the:transition intokitty_escape_event_type_stage.1), repeat (2), and unspecified (0) events throughkittyUnicodeKeyActionfor all keycodes.3) across all keycodes.src/ui/input/runtime.zig.