summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Tobias Schiller <mala@hinterbergen.de>2016-11-14 18:25:51 +0100
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2016-11-14 19:58:02 +0100
commit740ada1447a0bf9eb7db327d9433fa0b96e0a4d8 (patch)
tree3804979609cc8b1673e9f3ee594a76bdc23f38ba
parent424202798b02554092ba84dd59fb7b79b59b7b75 (diff)
make the various combinations of arrow keys and shift/control/meta work
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.
-rw-r--r--config.def.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h
index 7f465d1..32d107d 100644
--- a/config.def.h
+++ b/config.def.h
@@ -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},