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

Kitty Keyboard encoding has incorrect modifier bits for modifier keys #4965

Open
rockorager opened this issue Jan 12, 2025 · 0 comments
Open
Labels
input Keyboard or mouse input

Comments

@rockorager
Copy link
Collaborator

rockorager commented Jan 12, 2025

When using kitty keyboard protocol encoding, Ghostty incorrectly sets the modifier bits. Per the specification:

When the key event is related to an actual modifier key, the corresponding modifier’s bit must be set to the modifier state including the effect for the current event.

I tested this on Alacritty, Foot, Kitty, and Ghostty. All except Ghostty have the same encoding for this keypress.

I suspect this is only on a GTK build under Wayland, due to how Wayland delivers modifier presses + modifier events.

Repro Steps

  1. kitten show_key -m kitty
  2. Press control

Expected Output

CSI 57442 ; 5 u (press)

CSI 57442; 1 : 3 u (release)

Actual Output

CSI 57442 u (press)

CSI 57442 ; 5 : 3 u (release)

Reference: kovidgoyal/kitty#6913 (comment)

@mitchellh mitchellh added the input Keyboard or mouse input label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input Keyboard or mouse input
Projects
None yet
Development

No branches or pull requests

2 participants