Rename KEYC_ESCAPE to KEYC_META.

This commit is contained in:
Nicholas Marriott
2020-05-15 11:24:30 +01:00
parent 2cf967ee67
commit 031d4864a9
7 changed files with 74 additions and 74 deletions

View File

@ -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);