I'm currently looking at key mapping improvements (for 5.0) and, trying to work out what to do with CSI u sequences (and therefore playing with kitty), I find that I have to recommend the removal of key bindings which use those sequences until such time as the input code gains some sort of understanding of them.
I further recommend echoing CSI > 0 u on startup and CSI < u on exit, in both cases while the alt screen is in use if using it.
The following is for pressing Ctrl-I in four different situations:
- with Num Lock, Caps Lock and Scroll Lock all off;
- with Num Lock on;
- with Num Lock & Caps Lock on;
- with all three on.
As can be seen, the reported sequence differs. (For some reason, my keyboard layout has Meta on Scroll Lock.)
I would recommend the replacement of ; 5 with ; 6 in those sequences (to handle Shift-Ctrl-key), but either 3 or 7 other bindings would need to be added for each one changed…
$ echo -ne '\e[>1u';showkey -a; echo -ne '\e[<u'
Press any keys - Ctrl-D will terminate this program
^[[105;5u 27 0033 0x1b
91 0133 0x5b
49 0061 0x31
48 0060 0x30
53 0065 0x35
59 0073 0x3b
53 0065 0x35
117 0165 0x75
^[[105;133u 27 0033 0x1b
91 0133 0x5b
49 0061 0x31
48 0060 0x30
53 0065 0x35
59 0073 0x3b
49 0061 0x31
51 0063 0x33
51 0063 0x33
117 0165 0x75
^[[105;197u 27 0033 0x1b
91 0133 0x5b
49 0061 0x31
48 0060 0x30
53 0065 0x35
59 0073 0x3b
49 0061 0x31
57 0071 0x39
55 0067 0x37
117 0165 0x75
^[[105;205u 27 0033 0x1b
91 0133 0x5b
49 0061 0x31
48 0060 0x30
53 0065 0x35
59 0073 0x3b
50 0062 0x32
48 0060 0x30
53 0065 0x35
117 0165 0x75
zsh: terminated showkey -a
$
(Yes, I had to killall showkey from a different terminal.)
I'm currently looking at key mapping improvements (for 5.0) and, trying to work out what to do with
CSI usequences (and therefore playing with kitty), I find that I have to recommend the removal of key bindings which use those sequences until such time as the input code gains some sort of understanding of them.I further recommend echoing
CSI > 0 uon startup andCSI < uon exit, in both cases while the alt screen is in use if using it.The following is for pressing Ctrl-I in four different situations:
As can be seen, the reported sequence differs. (For some reason, my keyboard layout has Meta on Scroll Lock.)
I would recommend the replacement of
; 5with; 6in those sequences (to handle Shift-Ctrl-key), but either 3 or 7 other bindings would need to be added for each one changed…(Yes, I had to
killall showkeyfrom a different terminal.)