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, #508
  • Shift + Enter = modifiers::NONE (iTerm2, Terminal.app, gnome-terminal,VSCode Integrated Terminal) #669
  • Alt + Enter = modifiers::ALT (iTerm2, Terminal.app, VSCode Integrated Terminal) #669
  • Alt + Enter = modifiers::NONE (iTerm2, Terminal.app) #669
  • Cmd + Arrow Right = Some gibberish events (IntelliJ IDEA Terminal) #597
  • ALT + [ = doesnt work.
  • ALT + ] Doesnt work.
  • Ctrl+Backspace = Missing modifier (iTerm2) #575, #504
  • Alt+Backspace = Missing modifier (iTerm2) #575, #504
  • Shift + 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

Most upvoted comments

another technical question, please, is there a way to get a Vec<u8> from the unsupported keys, something like RawKey, 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 press Shift+Tab it will give back:

Event: Key(KeyEvent { code: Tab, modifiers: KeyModifiers(ALT), kind: Press, state: KeyEventState(0x0) })

This issue tracks all kinds of missing key combinations so can not be closed as there are still some left