diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-06 19:00:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-06-06 19:00:14 +0000 |
commit | 38965f5299b268b94c338ebb68e4a7f8aa330325 (patch) | |
tree | 4bc3c3c009d427d06b6bbc529b470e14a741932a /usr.bin/tmux/tmux.h | |
parent | e63e697bedbb9649d9bb7b924b7b17fe2f675c6c (diff) |
Use a macro-based mask for obtaining a key or modifier-set from the
combination. Display C-@, etc, as C-Space, in list-keys. By Micah Cowan.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r-- | usr.bin/tmux/tmux.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 905e018dd88..00ac0374b99 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.224 2010/06/05 16:47:11 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.225 2010/06/06 19:00:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -111,6 +111,10 @@ extern char **environ; #define KEYC_SHIFT 0x8000 #define KEYC_PREFIX 0x10000 +/* Mask to obtain key w/o modifiers */ +#define KEYC_MASK_MOD (KEYC_ESCAPE|KEYC_CTRL|KEYC_SHIFT|KEYC_PREFIX) +#define KEYC_MASK_KEY (~KEYC_MASK_MOD) + /* Other key codes. */ enum key_code { /* Mouse key. */ |