summaryrefslogtreecommitdiffstats
path: root/input-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-15 11:24:30 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-15 11:24:30 +0100
commit031d4864a94cd7c042fe96a2d236bccde83655e7 (patch)
tree29ce25dd1efce62c452d5fc39c45379da955ad6c /input-keys.c
parent2cf967ee6786776675634459eefdff3dd7d7b778 (diff)
Rename KEYC_ESCAPE to KEYC_META.
Diffstat (limited to 'input-keys.c')
-rw-r--r--input-keys.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/input-keys.c b/input-keys.c
index 30141243..7f2bc7d8 100644
--- a/input-keys.c
+++ b/input-keys.c
@@ -335,12 +335,12 @@ static const key_code input_key_modifiers[] = {
0,
0,
KEYC_SHIFT|KEYC_XTERM,
- KEYC_ESCAPE|KEYC_XTERM,
- KEYC_SHIFT|KEYC_ESCAPE|KEYC_XTERM,
+ KEYC_META|KEYC_XTERM,
+ KEYC_SHIFT|KEYC_META|KEYC_XTERM,
KEYC_CTRL|KEYC_XTERM,
KEYC_SHIFT|KEYC_CTRL|KEYC_XTERM,
- KEYC_ESCAPE|KEYC_CTRL|KEYC_XTERM,
- KEYC_SHIFT|KEYC_ESCAPE|KEYC_CTRL|KEYC_XTERM
+ KEYC_META|KEYC_CTRL|KEYC_XTERM,
+ KEYC_SHIFT|KEYC_META|KEYC_CTRL|KEYC_XTERM
};
/* Input key comparison function. */
@@ -448,9 +448,9 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
* If this is a normal 7-bit key, just send it, with a leading escape
* if necessary. If it is a UTF-8 key, split it and send it.
*/
- justkey = (key & ~(KEYC_XTERM|KEYC_ESCAPE));
+ justkey = (key & ~(KEYC_XTERM|KEYC_META));
if (justkey <= 0x7f) {
- if (key & KEYC_ESCAPE)
+ if (key & KEYC_META)
bufferevent_write(bev, "\033", 1);
ud.data[0] = justkey;
bufferevent_write(bev, &ud.data[0], 1);
@@ -459,7 +459,7 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
if (justkey > 0x7f && justkey < KEYC_BASE) {
if (utf8_split(justkey, &ud) != UTF8_DONE)
return (-1);
- if (key & KEYC_ESCAPE)
+ if (key & KEYC_META)
bufferevent_write(bev, "\033", 1);
bufferevent_write(bev, ud.data, ud.size);
return (0);
@@ -482,7 +482,7 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key)
log_debug("found key 0x%llx: \"%s\"", key, ike->data);
/* Prefix a \033 for escape. */
- if (key & KEYC_ESCAPE)
+ if (key & KEYC_META)
bufferevent_write(bev, "\033", 1);
bufferevent_write(bev, ike->data, datalen);
return (0);