Skip to content

Increase support for kitty enhanced keyboard protocol#688

Merged
TimonPost merged 2 commits intocrossterm-rs:masterfrom
pianohacker:pianohacker_add_csi_u_types
Jul 24, 2022
Merged

Increase support for kitty enhanced keyboard protocol#688
TimonPost merged 2 commits intocrossterm-rs:masterfrom
pianohacker:pianohacker_add_csi_u_types

Conversation

@pianohacker
Copy link
Copy Markdown
Contributor

@pianohacker pianohacker commented Jul 22, 2022

Add parsing of repeat/release key events, and allow sending the CSIs to enable/disable the enhanced keyboard protocol.

See https://sw.kovidgoyal.net/kitty/keyboard-protocol/ for more information.

Note: this changes the form of the KeyEvent struct.

Add parsing of repeat/release key events, and allow sending the CSIs to enable/disable the enhanced keyboard protocol.

See https://sw.kovidgoyal.net/kitty/keyboard-protocol/ for more information.
@pianohacker pianohacker requested a review from TimonPost as a code owner July 22, 2022 08:05
@TimonPost
Copy link
Copy Markdown
Member

Interesting. Would be nice to see the modifiers like Meta implemented as well https://sw.kovidgoyal.net/kitty/keyboard-protocol/#modifiers in a followup. Lots of people commented on that and this protocol seems to allow fetching it

Comment thread src/event.rs
Comment thread src/event.rs Outdated
Comment thread src/event.rs
@pianohacker
Copy link
Copy Markdown
Contributor Author

Agreed; I didn't want to add too much at once, but the extra modifiers would be great.

I'd also like to add support for https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions , but that's a weighty PR.

@pianohacker
Copy link
Copy Markdown
Contributor Author

I ended up adding support for the functional keys, as otherwise they end up as unicode gibberish: pianohacker/crossterm@pianohacker_add_csi_u_types...pianohacker:crossterm:pianohacker_add_functional_keys

I'll create a PR for that after this one.

Copy link
Copy Markdown
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you so much

@TimonPost TimonPost merged commit 60e51be into crossterm-rs:master Jul 24, 2022
@pianohacker pianohacker deleted the pianohacker_add_csi_u_types branch August 2, 2022 20:47
takumi-earth pushed a commit to earthlings-dev/crossterm that referenced this pull request Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants