input: intercept a spurious keycode and say what the actual problem is

Xfce Terminal sets TERM to xterm-256color even though it does not have
all the capabilities that an xterm has, leading it to misinterpret some
escape sequence and produce a spurious 0x24C key code.

Intercept this mistaken key code and tell the user what is wrong.

This mitigates https://savannah.gnu.org/bugs/?64578.
Reported-by: Lawrence R. Steeger
This commit is contained in:
Benno Schulenberg 2023-08-27 13:05:14 +02:00
parent 75b312ded1
commit f0f1c94afa

View File

@ -1320,6 +1320,11 @@ int parse_kbinput(WINDOW *frame)
case KEY_BTAB:
return SHIFT_TAB;
case 0x24C:
statusline(ALERT, _("Wrong TERM for this terminal"));
place_the_cursor();
return ERR;
case KEY_SBEG:
case KEY_BEG:
case KEY_B2: /* Center (5) on keypad with NumLock off. */