make the various combinations of arrow keys and shift/control/meta work
authorManuel Tobias Schiller <mala@hinterbergen.de>
Mon, 14 Nov 2016 17:25:51 +0000 (18:25 +0100)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Mon, 14 Nov 2016 18:58:02 +0000 (19:58 +0100)
When using st with screen, I've bound next, prev, new screen to
combinations like Ctrl-Alt-Right,Left,Down; xterm and (u)rxvt work fine
when this combination of modifiers is pressed, st does not seem to
transport all of them; a single modifier key is fine (e.g. Ctrl-Up,
Alt-Down etc., but combinations are not). While I'm not terribly
familiar with this, I have tried to hack config.h in a more or less
systematic way to generate the expected sequences.

config.def.h

index 7f465d1..32d107d 100644 (file)
@@ -280,23 +280,39 @@ static Key key[] = {
        { XK_KP_8,          XK_ANY_MOD,     "\033Ox",       +2,    0,    0},
        { XK_KP_9,          XK_ANY_MOD,     "\033Oy",       +2,    0,    0},
        { XK_Up,            ShiftMask,      "\033[1;2A",     0,    0,    0},
-       { XK_Up,            ControlMask,    "\033[1;5A",     0,    0,    0},
        { XK_Up,            Mod1Mask,       "\033[1;3A",     0,    0,    0},
+       { XK_Up,         ShiftMask|Mod1Mask,"\033[1;4A",     0,    0,    0},
+       { XK_Up,            ControlMask,    "\033[1;5A",     0,    0,    0},
+       { XK_Up,      ShiftMask|ControlMask,"\033[1;6A",     0,    0,    0},
+       { XK_Up,       ControlMask|Mod1Mask,"\033[1;7A",     0,    0,    0},
+       { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A",  0,    0,    0},
        { XK_Up,            XK_ANY_MOD,     "\033[A",        0,   -1,    0},
        { XK_Up,            XK_ANY_MOD,     "\033OA",        0,   +1,    0},
        { XK_Down,          ShiftMask,      "\033[1;2B",     0,    0,    0},
-       { XK_Down,          ControlMask,    "\033[1;5B",     0,    0,    0},
        { XK_Down,          Mod1Mask,       "\033[1;3B",     0,    0,    0},
+       { XK_Down,       ShiftMask|Mod1Mask,"\033[1;4B",     0,    0,    0},
+       { XK_Down,          ControlMask,    "\033[1;5B",     0,    0,    0},
+       { XK_Down,    ShiftMask|ControlMask,"\033[1;6B",     0,    0,    0},
+       { XK_Down,     ControlMask|Mod1Mask,"\033[1;7B",     0,    0,    0},
+       { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0,    0,    0},
        { XK_Down,          XK_ANY_MOD,     "\033[B",        0,   -1,    0},
        { XK_Down,          XK_ANY_MOD,     "\033OB",        0,   +1,    0},
        { XK_Left,          ShiftMask,      "\033[1;2D",     0,    0,    0},
-       { XK_Left,          ControlMask,    "\033[1;5D",     0,    0,    0},
        { XK_Left,          Mod1Mask,       "\033[1;3D",     0,    0,    0},
+       { XK_Left,       ShiftMask|Mod1Mask,"\033[1;4D",     0,    0,    0},
+       { XK_Left,          ControlMask,    "\033[1;5D",     0,    0,    0},
+       { XK_Left,    ShiftMask|ControlMask,"\033[1;6D",     0,    0,    0},
+       { XK_Left,     ControlMask|Mod1Mask,"\033[1;7D",     0,    0,    0},
+       { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0,    0,    0},
        { XK_Left,          XK_ANY_MOD,     "\033[D",        0,   -1,    0},
        { XK_Left,          XK_ANY_MOD,     "\033OD",        0,   +1,    0},
        { XK_Right,         ShiftMask,      "\033[1;2C",     0,    0,    0},
-       { XK_Right,         ControlMask,    "\033[1;5C",     0,    0,    0},
        { XK_Right,         Mod1Mask,       "\033[1;3C",     0,    0,    0},
+       { XK_Right,      ShiftMask|Mod1Mask,"\033[1;4C",     0,    0,    0},
+       { XK_Right,         ControlMask,    "\033[1;5C",     0,    0,    0},
+       { XK_Right,   ShiftMask|ControlMask,"\033[1;6C",     0,    0,    0},
+       { XK_Right,    ControlMask|Mod1Mask,"\033[1;7C",     0,    0,    0},
+       { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0,   0,    0},
        { XK_Right,         XK_ANY_MOD,     "\033[C",        0,   -1,    0},
        { XK_Right,         XK_ANY_MOD,     "\033OC",        0,   +1,    0},
        { XK_ISO_Left_Tab,  ShiftMask,      "\033[Z",        0,    0,    0},