tweaks: reshuffle some fragments, to make the next change easier
parent
cdd6882541
commit
4923119174
17
src/winio.c
17
src/winio.c
|
@ -935,20 +935,21 @@ 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);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue