Add more complete support for kitty keyboard protocol
We support the basic CSI u
encoding, upon which the kitty keyboard protocol is based, but there are a number of things we need to do before we can enable the full kitty protocol at startup.
The first thing to figure out is how to properly support binding e.g. Ctrl+Shift+q and Ctrl+q as separate key combos. Due to the way key bindings were handled historically, both in dte itself and in terminals in general, these 2 combos are currently ambiguous and effectively inseparable. This stemmed from the fact that older terminals never sent distinct escape sequences for e.g. Ctrl+Shift+q - they either reserved the Ctrl+Shift prefix for their own internal bindings or sent key sequences to the client as if Shift wasn't pressed.
TODO:
-
Update parse_key_string()
to interpret eitherC-C
orC-c
as Ctrl+c (for backwards compat.).C-S-c
is Ctrl+Shift+c (previously unbindable). -
Update parse_key_string()
to translate e.g.M-A
toM-S-a
(for backwards compat.). These 2 now result in the sameKeyCode
, but the latter is considered the canonical form. -
Update various quirks in KeyCode
normalization, to reflect the above changes. -
Start emitting \e[>1u
at startup, for supported terminals. -
Update built-in key bindings (in config/binding/default
) with new canonical key strings. -
Update example key strings in documentation to new canonical form. -
Add support for "report alternate keys" mode ( 0b100
) and start emitting\e[>5u
at startup. -
Prefer "base layout key", if present. -
Allow binding Ctrl+i separately from Tab. -
Allow binding Ctrl+m separately from Enter. -
Allow binding Ctrl+[ separately from Esc.
Edited by Craig Barnes