Handle modifier 9 as Meta, GitHub issue 2647.
-/* $OpenBSD: key-bindings.c,v 1.132 2020/10/13 10:15:23 nicm Exp $ */
+/* $OpenBSD: key-bindings.c,v 1.133 2021/06/10 07:21:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
if (repeat)
bd->flags |= KEY_BINDING_REPEAT;
bd->cmdlist = cmdlist;
+
+ log_debug("%s: %#llx %s = %s", __func__, bd->key,
+ key_string_lookup_key(bd->key, 1), cmd_list_print(bd->cmdlist, 0));
}
void
if (bd == NULL)
return;
+ log_debug("%s: %#llx %s", __func__, bd->key,
+ key_string_lookup_key(bd->key, 1));
+
RB_REMOVE(key_bindings, &table->key_bindings, bd);
key_bindings_free(bd);
-/* $OpenBSD: key-string.c,v 1.65 2021/04/07 15:46:12 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.66 2021/06/10 07:21:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
key_code
key_string_lookup_string(const char *string)
{
- static const char *other = "!#()+,-.0123456789:;<=>'\r\t\177";
+ static const char *other = "!#()+,-.0123456789:;<=>'\r\t\177`/";
key_code key, modifiers;
u_int u, i;
struct utf8_data ud, *udp;
}
/* Convert the standard control keys. */
- if (key < KEYC_BASE && (modifiers & KEYC_CTRL) &&
- strchr(other, key) == NULL) {
+ if (key < KEYC_BASE &&
+ (modifiers & KEYC_CTRL) &&
+ strchr(other, key) == NULL &&
+ key != 9 &&
+ key != 13 &&
+ key != 27) {
if (key >= 97 && key <= 122)
key -= 96;
else if (key >= 64 && key <= 95)
-/* $OpenBSD: tty-keys.c,v 1.146 2021/04/13 12:26:34 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.147 2021/06/10 07:21:10 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
KEYC_CTRL,
KEYC_SHIFT|KEYC_CTRL,
KEYC_META|KEYC_IMPLIED_META|KEYC_CTRL,
- KEYC_SHIFT|KEYC_META|KEYC_IMPLIED_META|KEYC_CTRL
+ KEYC_SHIFT|KEYC_META|KEYC_IMPLIED_META|KEYC_CTRL,
+ KEYC_META|KEYC_IMPLIED_META
};
/*
case 8:
nkey |= (KEYC_SHIFT|KEYC_META|KEYC_IMPLIED_META|KEYC_CTRL);
break;
+ case 9:
+ nkey |= (KEYC_META|KEYC_IMPLIED_META);
+ break;
default:
*key = KEYC_NONE;
break;
*/
if (nkey & KEYC_CTRL) {
onlykey = (nkey & KEYC_MASK_KEY);
- if (onlykey < 32 && onlykey != 9)
+ if (onlykey < 32 &&
+ onlykey != 9 &&
+ onlykey != 13 &&
+ onlykey != 27)
/* nothing */;
else if (onlykey >= 97 && onlykey <= 122)
onlykey -= 96;