Skip to content

Remove CSIu sequences from keybindings for now #84

Description

@dsalt

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions