diff options
author | nicm <nicm> | 2016-10-11 09:30:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-11 09:30:36 +0000 |
commit | 85d7afaefc1e2cf8008575a776ec70f51d24e1a6 (patch) | |
tree | a21793f0c47a4683a2cf40ea07387e9e402b052d /tmux.h | |
parent | 76d6d3641f271be1756e41494960d96714e7ee58 (diff) | |
download | rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.tar.gz rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.tar.bz2 rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.zip |
Support double and triple clicks (they are cumulative, so double is
fired then triple), and use for select-word and select-line in copy
mode. Inspired by a different solution from Omar Sandoval.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -105,6 +105,9 @@ struct tmuxproc; #define KEYC_IS_MOUSE(key) (((key) & KEYC_MASK_KEY) >= KEYC_MOUSE && \ ((key) & KEYC_MASK_KEY) < KEYC_BSPACE) +/* Multiple click timeout. */ +#define KEYC_CLICK_TIMEOUT 300 + /* Mouse key codes. */ #define KEYC_MOUSE_KEY(name) \ KEYC_ ## name ## _PANE, \ @@ -143,6 +146,12 @@ enum { KEYC_MOUSE_KEY(MOUSEDRAGEND3), KEYC_MOUSE_KEY(WHEELUP), KEYC_MOUSE_KEY(WHEELDOWN), + KEYC_MOUSE_KEY(DOUBLECLICK1), + KEYC_MOUSE_KEY(DOUBLECLICK2), + KEYC_MOUSE_KEY(DOUBLECLICK3), + KEYC_MOUSE_KEY(TRIPLECLICK1), + KEYC_MOUSE_KEY(TRIPLECLICK2), + KEYC_MOUSE_KEY(TRIPLECLICK3), /* Backspace key. */ KEYC_BSPACE, @@ -1216,6 +1225,9 @@ struct client { struct event repeat_timer; + struct event click_timer; + u_int click_button; + struct event status_timer; struct screen status; @@ -1239,6 +1251,8 @@ struct client { #define CLIENT_256COLOURS 0x20000 #define CLIENT_IDENTIFIED 0x40000 #define CLIENT_STATUSFORCE 0x80000 +#define CLIENT_DOUBLECLICK 0x100000 +#define CLIENT_TRIPLECLICK 0x200000 int flags; struct key_table *keytable; |