Use a macro-based mask for obtaining a key or modifier-set from the combination.

Display C-@, etc, as C-Space, in list-keys.
This commit is contained in:
Micah Cowan
2010-06-05 20:29:11 +00:00
parent 89eb95265a
commit 227e458ebb
3 changed files with 20 additions and 7 deletions

6
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.558 2010-05-22 21:56:04 micahcowan Exp $ */
/* $Id: tmux.h,v 1.559 2010-06-05 20:29:11 micahcowan Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -110,6 +110,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. */