Handle C-Tab correctly with extended keys, GitHub issue 2642.

This commit is contained in:
nicm 2021-04-13 05:23:34 +00:00 committed by Nicholas Marriott
parent 30cf20d615
commit f29d3c7f74

View File

@ -955,9 +955,12 @@ tty_keys_extended_key(struct tty *tty, const char *buf, size_t len,
*/
if (nkey & KEYC_CTRL) {
onlykey = (nkey & KEYC_MASK_KEY);
if (onlykey < 32)
if (onlykey < 32) {
if (onlykey != 9)
onlykey = (nkey & ~KEYC_CTRL);
else {
else
onlykey = (9|KEYC_CTRL);
} else {
if (onlykey >= 97 && onlykey <= 122)
onlykey -= 96;
else if (onlykey >= 64 && onlykey <= 95)