From 2e539e2c97e7fa7fa47f94c8c259ce9396656e19 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 27 Dec 2019 11:35:10 +0100 Subject: [PATCH] tweaks: stop recognizing escape sequences for a key without meaning Nano does not do anything for the keystroke anyway (KEY_B2, the center key on the numeric keypad, gets translated to ERR later on), so there is no point in recognizing some of its escape sequences -- let those sequences result in "Unknown sequence" instead. --- src/winio.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/winio.c b/src/winio.c index 428bccfd..b09fdf1c 100644 --- a/src/winio.c +++ b/src/winio.c @@ -863,9 +863,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) case 'C': /* Esc O C == Right on VT100/VT320/xterm. */ case 'D': /* Esc O D == Left on VT100/VT320/xterm. */ return arrow_from_abcd(seq[1]); - case 'E': /* Esc O E == Center (5) on numeric keypad - * with NumLock off on xterm. */ - return KEY_B2; case 'F': /* Esc O F == End on xterm/Terminal. */ return KEY_END; case 'H': /* Esc O H == Home on xterm/Terminal. */ @@ -928,10 +925,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) return KEY_NPAGE; case 't': /* Esc O t == Left (4) on the same. */ return KEY_LEFT; - case 'u': /* Esc O u == Center (5) on numeric keypad - * with NumLock off on VT100/VT220/VT320/ - * rxvt/Eterm. */ - return KEY_B2; case 'v': /* Esc O v == Right (6) on numeric keypad * with NumLock off on VT100/VT220/VT320/ * rxvt/Eterm/Terminal. */ @@ -1203,9 +1196,6 @@ int convert_sequence(const int *seq, size_t length, int *consumed) case 'C': /* Esc [ C == Right on the same. */ case 'D': /* Esc [ D == Left on the same. */ return arrow_from_abcd(seq[1]); - case 'E': /* Esc [ E == Center (5) on numeric keypad with - * NumLock off on FreeBSD console/Terminal. */ - return KEY_B2; case 'F': /* Esc [ F == End on FreeBSD console/Eterm. */ return KEY_END; case 'G': /* Esc [ G == PageDown on FreeBSD console. */