crossterm: Tracking: Missing key combinations
Parsing ANSI codes to input events is a pain. There is no good way to tell which terminals implement which key combinations. Therefore it might occur that some terminals do support certain key presses while others dont. This issue serves as a tracking issue and lists various keys that are reported missing. Either it might be that crossterm has not yet implemented it or that the terminal doesn’t support the key combination. Please post your missing keys in this issue.
How to debug
This code is responsible for parsing a bytes buffer to an event. If you miss a key, it is useful if you can print the buffer with println!("Buffer: {:?}, buffer)
in this function. Then report that value with the missing keys in this issue. That way we can trace back and see if crossterm should add parsing logic for that buffer.
Reported Missing
Ctrl + Enter
= modifiers::NONE (iTerm2, Terminal.app, gnome-terminal,VSCode Integrated Terminal) #669, #508Shift + Enter
= modifiers::NONE (iTerm2, Terminal.app, gnome-terminal,VSCode Integrated Terminal) #669Alt + Enter
= modifiers::ALT (iTerm2, Terminal.app, VSCode Integrated Terminal) #669Alt + Enter
= modifiers::NONE (iTerm2, Terminal.app) #669Cmd + Arrow Right
= Some gibberish events (IntelliJ IDEA Terminal) #597ALT + [
= doesnt work.ALT + ]
Doesnt work.Ctrl+Backspace
= Missing modifier (iTerm2) #575, #504Alt+Backspace
= Missing modifier (iTerm2) #575, #504Shift + F3
Key Event not read (ubunutu) #513- Scroll up/down two finger gesture Macos (kitty) #668
- Ctrl+shift+Letters only gives the modifier ctrl (unix) #719
- Mouse up/down/move events never have KeyModifiers applied (konsole) #708
note: not all are solved
Note
Please do not create a separate issue for missing combinations, instead comment in this issue such that I can update the above list. The above list contains combinations that might have been fixed or missing combinations that are still to be fixed.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Key binding reword to avoid key not getting registered properly https://github.com/crossterm-rs/crossterm/issues/685 — committed to Julien-cpsn/ATAC by Julien-cpsn 3 months ago
another technical question, please, is there a way to get a
Vec<u8>
from the unsupported keys, something likeRawKey
, so that maybe i can solve the problem temporarily for my code?to at least to see what
ctrl + enter
does look like as bytes, for example.cant see anything like that in the docs.
Sorry for not being entirely clear. This is purely a Linux TTY issue, it works fine in any non-TTY terminal I have tried (Alacritty, Kitty, etc.). So if you run
cargo r --example event-read
and pressShift+Tab
it will give back:This issue tracks all kinds of missing key combinations so can not be closed as there are still some left