commit 41b52d70be2efd4074b13cad61d4d3ab0514e2d1
parent 129696cdbeaa9d1540bd463d1283af4ae2481428
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 16 Dec 2023 15:14:34 +0100
input: recognize certain escape sequences for F13 to F16 again
Even though in nano the names F13 to F24 exist, these names actually
refer to Shift+F1...Shift+F12. One cannot blame people for thinking
that F13 in nano is the same as F13 in Xorg, so... recognize the escape
sequence for the latter and map it to what nano calls F13.
This accommodates users that put F13...F16 in a custom keymap for Xorg.
This fixes https://savannah.gnu.org/bugs/?64632.
Reported-by: Danny Milosavljevic <dannym@scratchpost.org>
Problem existed since version 5.0, commit 9a6158cd.
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -699,6 +699,16 @@ int convert_CSI_sequence(const int *seq, size_t length, int *consumed)
return KEY_F(11);
case '4': /* Esc [ 2 4 ~ == F12 on the same. */
return KEY_F(12);
+#ifdef ENABLE_NANORC
+ case '5': /* Esc [ 2 5 ~ == F13 on the same. */
+ return KEY_F(13);
+ case '6': /* Esc [ 2 6 ~ == F14 on the same. */
+ return KEY_F(14);
+ case '8': /* Esc [ 2 8 ~ == F15 on the same. */
+ return KEY_F(15);
+ case '9': /* Esc [ 2 9 ~ == F16 on the same. */
+ return KEY_F(16);
+#endif
}
} else if (length > 1 && seq[1] == '~')
/* Esc [ 2 ~ == Insert on VT220/VT320/