tweaks: reshuffle some fragments, to make the next change easier
Этот коммит содержится в:
родитель
cdd6882541
Коммит
4923119174
15
src/winio.c
15
src/winio.c
@ -935,19 +935,20 @@ int parse_kbinput(WINDOW *win)
|
|||||||
return keycode;
|
return keycode;
|
||||||
} else if (escapes == 1) {
|
} else if (escapes == 1) {
|
||||||
escapes = 0;
|
escapes = 0;
|
||||||
/* Key codes out of ASCII range cannot form escape sequences. */
|
/* Codes out of ASCII printable range cannot form an escape sequence. */
|
||||||
if (keycode >= 0x80) {
|
if (keycode < 0x20 || 0x7E < keycode) {
|
||||||
|
if (keycode == '\t')
|
||||||
|
return SHIFT_TAB;
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (keycode == KEY_BACKSPACE)
|
else if (keycode == KEY_BACKSPACE)
|
||||||
return CONTROL_SHIFT_DELETE;
|
return CONTROL_SHIFT_DELETE;
|
||||||
#endif
|
#endif
|
||||||
} else if (keycode == '\t')
|
else if (!solitary)
|
||||||
return SHIFT_TAB;
|
meta_key = TRUE;
|
||||||
else if (key_buffer_len == 0 || *key_buffer == ESC_CODE ||
|
} else if (key_buffer_len == 0 || *key_buffer == ESC_CODE ||
|
||||||
(keycode != 'O' && keycode != '[')) {
|
(keycode != 'O' && keycode != '[')) {
|
||||||
if (!shifted_metas)
|
if (!shifted_metas)
|
||||||
keycode = tolower(keycode);
|
keycode = tolower(keycode);
|
||||||
if (!solitary || (0x20 <= keycode && keycode <= 0x7E))
|
|
||||||
meta_key = TRUE;
|
meta_key = TRUE;
|
||||||
} else
|
} else
|
||||||
keycode = parse_escape_sequence(keycode);
|
keycode = parse_escape_sequence(keycode);
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user