aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-02-18 14:52:27 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-02-18 14:52:27 +0000
commite5eee7de0c35e296b92707fdf66ddd5271f4bcfc (patch)
treeaf6397f3e9e169d12a4cc35b25485cbb4274a313 /tmux.h
parentd8261019f1b1fcf58a79b82448e8851e3acfd026 (diff)
downloadrtmux-e5eee7de0c35e296b92707fdf66ddd5271f4bcfc.tar.gz
rtmux-e5eee7de0c35e296b92707fdf66ddd5271f4bcfc.tar.bz2
rtmux-e5eee7de0c35e296b92707fdf66ddd5271f4bcfc.zip
Support the latest theory for mouse input, this is enabled/disabled with SM/RM
1006 and is similar in style to SGR input: \033[<b;x;yM or \033[b;x;ym. From Egmont Koblinger.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index e10fb629..1efad53e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -661,7 +661,8 @@ struct mode_key_table {
#define MODE_MOUSE_BUTTON 0x40
#define MODE_MOUSE_ANY 0x80
#define MODE_MOUSE_UTF8 0x100
-#define MODE_BRACKETPASTE 0x200
+#define MODE_MOUSE_SGR 0x200
+#define MODE_BRACKETPASTE 0x400
#define ALL_MOUSE_MODES (MODE_MOUSE_STANDARD|MODE_MOUSE_BUTTON|MODE_MOUSE_ANY)
@@ -1149,6 +1150,9 @@ LIST_HEAD(tty_terms, tty_term);
* - bits 3, 4 and 5 are for keys
* - bit 6 is set for dragging
* - bit 7 for buttons 4 and 5
+ *
+ * With the SGR 1006 extension the released button becomes known. Store these
+ * in separate fields and store the value converted to the old format in xb.
*/
struct mouse_event {
u_int xb;
@@ -1161,6 +1165,10 @@ struct mouse_event {
u_int ly;
u_int sy;
+ u_int sgr; /* whether the input arrived in SGR format */
+ u_int sgr_xb; /* only for SGR: the unmangled button */
+ u_int sgr_rel; /* only for SGR: whether it is a release event */
+
u_int button;
u_int clicks;