From f0f1c94afa378cc7e6a8e10f24dc35ee5c31016e Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 27 Aug 2023 13:05:14 +0200 Subject: [PATCH] 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 --- src/winio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/winio.c b/src/winio.c index e73419bb..4831cb8d 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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. */