With keyboard enhancement protocol Alt+Shift bindings no longer work #9208
-
SummaryRecently my terminal alacritty started supporting the kitty keyboard protocol. I can verify that helix is now using it since there is this message when booting helix with I also have some keybinds like:
So far this always worked, but now it only runs the lower case binding even when holding shift. Is there a different way to bind keys with the kitty protocol? In terminal I can run Reproduction StepsI tried this: Configure helix with alt-shift combinations like the example above.
I expected this to happen: alt-shift-n to search backwards. Instead, this happened: alt-shift-n searched forwards. Helix logIs there a way to get keypress events in logs? PlatformmacOS Terminal Emulatoralacritty Installation Methodbrew Helix Versionhelix 23.10 (f6021dd) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I can't reproduce this with Kitty. AFAIK the kitty keyboard protocol support in alacritty is fairly new so this might be an alacritty bug. The way I typically debug key events is to run our terminal manipulation library's event-read example: https://github.com/crossterm-rs/crossterm/blob/master/examples/event-read.rs (i.e. clone that repository and run In order to make the kitty keyboard protocol settings the same, you can modify this block: https://github.com/crossterm-rs/crossterm/blob/08762b3ef4519e7f834453bf91e3fe36f4c63fe7/examples/event-read.rs#L78-L86 to be: PushKeyboardEnhancementFlags(
KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES
| KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS
) Those are the settings we enable in Helix. |
Beta Was this translation helpful? Give feedback.
-
Hey @the-mikedavis, thanks for the swift response. It seems to be alacritty indeed. It sends these events both both
While in kitty it is this:
I assumed the |
Beta Was this translation helpful? Give feedback.
I can't reproduce this with Kitty. AFAIK the kitty keyboard protocol support in alacritty is fairly new so this might be an alacritty bug.
The way I typically debug key events is to run our terminal manipulation library's event-read example: https://github.com/crossterm-rs/crossterm/blob/master/examples/event-read.rs (i.e. clone that repository and run
cargo run --example event-read
).In order to make the kitty keyboard protocol settings the same, you can modify this block: https://github.com/crossterm-rs/crossterm/blob/08762b3ef4519e7f834453bf91e3fe36f4c63fe7/examples/event-read.rs#L78-L86
to be: