mirror of git://git.suckless.org/st
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.
This commit is contained in:
parent
424202798b
commit
740ada1447
24
config.def.h
24
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},
|
||||
|
|
Loading…
Reference in New Issue