From b4b9b831ee9f6b1848657939fb19a7b7076d26f4 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 29 Jun 2010 05:24:49 +0000 Subject: replace some magic mouse constants with defines for clarity. ok nicm --- tmux.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 57656773..a6d10a0b 100644 --- a/tmux.h +++ b/tmux.h @@ -1050,9 +1050,23 @@ struct tty_ctx { u_int last_width; }; +/* + * xterm mouse mode is fairly silly. Buttons are in the bottom two + * bits: 0 button 1; 1 button 2; 2 button 3; 3 buttons released. + * + * Bit 3 is shift; bit 4 is meta; bit 5 control. + * + * Bit 6 is added for mouse buttons 4 and 5. + */ /* Mouse input. */ struct mouse_event { u_char b; +#define MOUSE_1 0 +#define MOUSE_2 1 +#define MOUSE_3 2 +#define MOUSE_UP 3 +#define MOUSE_BUTTON 3 +#define MOUSE_45 64 u_char x; u_char y; }; -- cgit