Closed FrancescElies closed 1 month ago
You might find it a fun rabbit hole to go down as to why this is. But it's by design and likely not crossterm handling this, but your terminal. There are various control combinations that are equivalent, e.g. ctrl+[ Esc, ctrl+m Enter,and ctrl+i Tab. There are ways of disambiguating these, but they require terminal support and the app to turn on the ability.
See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#legacy-text-keys for some in depth info. And the set keyboard enhancement flags command for turning this on (not supported everywhere, be careful).
I say "likely" above as there's a small chance this is emulated behavior in crossterm (I doubt it, but haven't checked explicitly IIRC, there are some emulated control codes).
I see 😅, I was not aware of that, I guess I will keep have to keep that in in mind when binding shortcuts and keep myself away from ctrl-i
, ctrl-m
,
closing.
Confirmed that crossterm isn't doing anything special here - just mapping \t
=> KeyCode::Tab
.
https://github.com/search?q=repo%3Acrossterm-rs%2Fcrossterm+%22keycode%3A%3Atab%22&type=code
Describe the bug
ctrl-i
seems to be interpreted as tabTo Reproduce Steps to reproduce the behavior:
cargo run --example event-read
i
, thenctrl-i
, thenesc
to quitctrl-i
is interpreted as tabhttps://github.com/user-attachments/assets/888d3178-2347-475d-97a2-2348542db207
OS
Terminal/Console