aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-01-27 00:38:10 -0500
committerJesse Luehrs <doy@tozt.net>2017-01-27 00:38:10 -0500
commit7060c67885c975dfcafc81c8a719ef0b20346903 (patch)
treec6222679eb558f6459d5d62099abba2a8f5e245c
parentd47bd526aa0a8c5ae2cd697f4a8294702fd96944 (diff)
downloadrunes-7060c67885c975dfcafc81c8a719ef0b20346903.tar.gz
runes-7060c67885c975dfcafc81c8a719ef0b20346903.zip
also handle ctrl+arrows
-rw-r--r--src/window-xlib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/window-xlib.c b/src/window-xlib.c
index c12602f..2dbcbca 100644
--- a/src/window-xlib.c
+++ b/src/window-xlib.c
@@ -69,6 +69,15 @@ static struct function_key shift_keys[] = {
RUNES_KEY(XK_VoidSymbol, "")
};
+static struct function_key ctrl_keys[] = {
+ RUNES_KEY(XK_Up, "\033[Oa"),
+ RUNES_KEY(XK_Down, "\033[Ob"),
+ RUNES_KEY(XK_Right, "\033[Oc"),
+ RUNES_KEY(XK_Left, "\033[Od"),
+ RUNES_KEY(XK_Delete, "\033[3^"),
+ RUNES_KEY(XK_VoidSymbol, "")
+};
+
static struct function_key application_keypad_keys[] = {
/* XXX i don't have a keypad on my laptop, need to get one for testing */
RUNES_KEY(XK_VoidSymbol, "")
@@ -1259,6 +1268,9 @@ static struct function_key *runes_window_find_key_sequence(
if (e->state & ShiftMask) {
key = &shift_keys[0];
}
+ else if (e->state & ControlMask) {
+ key = &ctrl_keys[0];
+ }
else {
key = &keys[0];
}