-/* $OpenBSD: input-keys.c,v 1.90 2022/05/30 13:02:55 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.91 2022/11/01 09:54:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
},
{ .key = KEYC_DC|KEYC_BUILD_MODIFIERS,
.data = "\033[3;_~"
+ },
+
+ /* Tab and modifiers. */
+ { .key = '\011'|KEYC_CTRL,
+ .data = "\011"
+ },
+ { .key = '\011'|KEYC_CTRL|KEYC_EXTENDED,
+ .data = "\033[9;5u"
+ },
+ { .key = '\011'|KEYC_CTRL|KEYC_SHIFT,
+ .data = "\011"
+ },
+ { .key = '\011'|KEYC_CTRL|KEYC_SHIFT|KEYC_EXTENDED,
+ .data = "\033[1;5Z"
}
};
static const key_code input_key_modifiers[] = {
key &= ~KEYC_KEYPAD;
if (~s->mode & MODE_KCURSOR)
key &= ~KEYC_CURSOR;
+ if (~s->mode & MODE_KEXTENDED)
+ key &= ~KEYC_EXTENDED;
ike = input_key_get(key);
if (ike == NULL && (key & KEYC_META) && (~key & KEYC_IMPLIED_META))
ike = input_key_get(key & ~KEYC_META);
ike = input_key_get(key & ~KEYC_CURSOR);
if (ike == NULL && (key & KEYC_KEYPAD))
ike = input_key_get(key & ~KEYC_KEYPAD);
+ if (ike == NULL && (key & KEYC_EXTENDED))
+ ike = input_key_get(key & ~KEYC_EXTENDED);
if (ike != NULL) {
log_debug("found key 0x%llx: \"%s\"", key, ike->data);
if ((key & KEYC_META) && (~key & KEYC_IMPLIED_META))
-/* $OpenBSD: key-string.c,v 1.69 2022/02/16 18:55:05 nicm Exp $ */
+/* $OpenBSD: key-string.c,v 1.70 2022/11/01 09:54:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
strlcat(out, "I", sizeof out);
if (saved & KEYC_BUILD_MODIFIERS)
strlcat(out, "B", sizeof out);
+ if (saved & KEYC_EXTENDED)
+ strlcat(out, "E", sizeof out);
strlcat(out, "]", sizeof out);
}
return (out);
-/* $OpenBSD: tmux.h,v 1.1183 2022/10/28 13:00:02 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1184 2022/11/01 09:54:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
#define KEYC_IMPLIED_META 0x08000000000000ULL
#define KEYC_BUILD_MODIFIERS 0x10000000000000ULL
#define KEYC_VI 0x20000000000000ULL
+#define KEYC_EXTENDED 0x40000000000000ULL
/* Masks for key bits. */
#define KEYC_MASK_MODIFIERS 0x00f00000000000ULL
-/* $OpenBSD: tty-keys.c,v 1.158 2022/07/19 06:51:31 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.159 2022/11/01 09:54:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
/* Paste keys. */
{ "\033[200~", KEYC_PASTE_START },
{ "\033[201~", KEYC_PASTE_END },
+
+ /* Extended keys. */
+ { "\033[1;5Z", '\011'|KEYC_CTRL|KEYC_SHIFT|KEYC_EXTENDED },
};
/* Default xterm keys. */
log_debug("%s: extended key %.*s is %llx (%s)", c->name,
(int)*size, buf, nkey, key_string_lookup_key(nkey, 1));
}
- *key = nkey;
+ *key = nkey|KEYC_EXTENDED;
return (0);
}