Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase support for kitty enhanced keyboard protocol #688

Merged

Conversation

pianohacker
Copy link
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.
@TimonPost
Copy link
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

src/event.rs Show resolved Hide resolved
src/event.rs Outdated Show resolved Hide resolved
src/event.rs Show resolved Hide resolved
@pianohacker
Copy link
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
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
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

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.

None yet

2 participants