diff options
author | 2010-06-29 05:24:49 +0000 | |
---|---|---|
committer | 2010-06-29 05:24:49 +0000 | |
commit | 8ac22b24507e90e0c8c7b86fd2a6082be7229637 (patch) | |
tree | ad8aeefdd367acf3ebdae5e7f2e70a2bb44f6c6d /usr.bin/tmux/tmux.h | |
parent | isdigit() is more readable than comparing ascii codes (diff) | |
download | wireguard-openbsd-8ac22b24507e90e0c8c7b86fd2a6082be7229637.tar.xz wireguard-openbsd-8ac22b24507e90e0c8c7b86fd2a6082be7229637.zip |
replace some magic mouse constants with defines for clarity. ok nicm
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index f8dd044d80b..09397cd8e58 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.232 2010/06/29 03:30:14 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.233 2010/06/29 05:24:49 tedu Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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; }; |