about summary refs log tree commit diff stats
path: root/cpp/termbox/input.inl
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-22 20:33:59 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-22 20:33:59 -0700
commitaa0bb974d39b1025c577fe80098285aed3d284d4 (patch)
treeb0a927699636b97624259dc6732142373c6e22e9 /cpp/termbox/input.inl
parent6f6b1b7fdb7ca115ae5862af3435db296fb0e4a9 (diff)
downloadmu-aa0bb974d39b1025c577fe80098285aed3d284d4.tar.gz
1142
Diffstat (limited to 'cpp/termbox/input.inl')
-rw-r--r--cpp/termbox/input.inl17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/termbox/input.inl b/cpp/termbox/input.inl
index eee888f2..8a4a14de 100644
--- a/cpp/termbox/input.inl
+++ b/cpp/termbox/input.inl
@@ -1,3 +1,20 @@
+/* Sets the termbox input mode. Termbox has two input modes:
+ * 1. Esc input mode.
+ *    When ESC sequence is in the buffer and it doesn't match any known
+ *    ESC sequence => ESC means TB_KEY_ESC.
+ * 2. Alt input mode.
+ *    When ESC sequence is in the buffer and it doesn't match any known
+ *    sequence => ESC enables TB_MOD_ALT modifier for the next keyboard event.
+ *
+ * If 'mode' is TB_INPUT_CURRENT, it returns the current input mode.
+ */
+int tb_select_input_mode(int mode);
+/* Possible values for mode. */
+#define TB_INPUT_CURRENT 0x0
+#define TB_INPUT_ESC     0x1
+#define TB_INPUT_ALT     0x2
+#define TB_INPUT_MOUSE   0x4
+
 // if s1 starts with s2 returns true, else false
 // len is the length of s1
 // s2 should be null-terminated