about summary refs log tree commit diff stats
path: root/termbox/input.inl
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-09-11 09:05:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-09-11 09:05:22 -0700
commit5cee556294afda23b0cce20afa365798f5ffbccc (patch)
tree52c49d5564bcc48d778f93fecce2644c469f62c0 /termbox/input.inl
parent8beff53e5a65ac23411221fdcf6e9607b6c2a715 (diff)
downloadmu-5cee556294afda23b0cce20afa365798f5ffbccc.tar.gz
2181 - detect shift-tab
Does nothing useful yet, though.
Diffstat (limited to 'termbox/input.inl')
-rw-r--r--termbox/input.inl6
1 files changed, 6 insertions, 0 deletions
diff --git a/termbox/input.inl b/termbox/input.inl
index 97e1f4b7..83b4bb8c 100644
--- a/termbox/input.inl
+++ b/termbox/input.inl
@@ -112,6 +112,12 @@ static int parse_escape_seq(struct tb_event *event, const char *buf, int len)
     parse_attempts = 0;
     return strlen("\033[1;5D");
   }
+  if (starts_with(buf, len, "\033[Z")) {
+    event->ch = 0;
+    event->key = TB_KEY_SHIFT_TAB;
+    parse_attempts = 0;
+    return strlen("\033[Z");
+  }
 
   // no escape sequence recognized? wait a bit in case our buffer is incomplete
   ++parse_attempts;