diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-10-24 00:30:51 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-10-24 00:30:51 +0000 |
commit | a7e5092bd4f8f6625499d2a4c9f6bc47ac298a00 (patch) | |
tree | 385f8c8d94de901dc78340f1ff5b11bdf40202ed /xterm-keys.c | |
parent | b73ac822fb6ba9d3d555dea1e7ae4a22a01e800a (diff) | |
download | rtmux-a7e5092bd4f8f6625499d2a4c9f6bc47ac298a00.tar.gz rtmux-a7e5092bd4f8f6625499d2a4c9f6bc47ac298a00.tar.bz2 rtmux-a7e5092bd4f8f6625499d2a4c9f6bc47ac298a00.zip |
Sync OpenBSD patchset 772:
Treat the meta bit in the xterm extended modifier key set as the same as
escape (tmux's meta). From Emanuele Giaquinta.
Diffstat (limited to 'xterm-keys.c')
-rw-r--r-- | xterm-keys.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xterm-keys.c b/xterm-keys.c index 9f98c7c5..5ce08641 100644 --- a/xterm-keys.c +++ b/xterm-keys.c @@ -1,4 +1,4 @@ -/* $Id: xterm-keys.c,v 1.6 2010-09-07 13:21:18 tcunha Exp $ */ +/* $Id: xterm-keys.c,v 1.7 2010-10-24 00:30:51 tcunha 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 |