diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-14 00:37:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-14 00:37:52 +0000 |
commit | 24d2c93045be0a7889a3e5f63b65eb03c32b083f (patch) | |
tree | b1880465a607d54fd71ebde4d1ea920f1189ade1 | |
parent | 263c3a9cba04cdf5bbd5365fc44ac71b66e83778 (diff) |
Treat the meta bit in the xterm extended modifier key set as the same as
escape (tmux's meta). From Emanuele Giaquinta.
-rw-r--r-- | usr.bin/tmux/xterm-keys.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/xterm-keys.c b/usr.bin/tmux/xterm-keys.c index 3acd69851f0..5c411d14ce3 100644 --- a/usr.bin/tmux/xterm-keys.c +++ b/usr.bin/tmux/xterm-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xterm-keys.c,v 1.6 2010/09/01 21:11:14 nicm Exp $ */ +/* $OpenBSD: xterm-keys.c,v 1.7 2010/10/14 00:37:51 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -128,6 +128,8 @@ xterm_keys_modifiers(const char *template, const char *buf, size_t len) modifiers |= KEYC_ESCAPE; if (param & 4) modifiers |= KEYC_CTRL; + if (param & 8) + modifiers |= KEYC_ESCAPE; return (modifiers); } @@ -172,6 +174,8 @@ xterm_keys_lookup(int key) modifiers += 2; if (key & KEYC_CTRL) modifiers += 4; + if (key & KEYC_ESCAPE) + modifiers += 8; /* * If the key has no modifiers, return NULL and let it fall through to |