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.
This commit is contained in:
Nicholas Marriott
2010-06-06 19:00:13 +00:00
parent 4e3bed2035
commit dcc100f165
3 changed files with 17 additions and 4 deletions

4
tmux.h
View File

@ -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. */