Hi Miod,

We need to generate escape codes for the extra function keys,
otherwise wsemul_vt100_keys.c tries to generate an ASCII code from
the keysym value, which gives us ^T ^U ^V ^W, which is not
particularly helpful.

There are no standard escape codes, and those for F1-F5 don't match
our defaults in xterm anyway, so I've just continued the sequence,
and am working on an updated termcap to support them anyway.

--- wsemul_vt100_keys.c.orig    Fri Mar 22 17:46:29 2013
+++ wsemul_vt100_keys.c Fri Mar 22 17:50:00 2013
@@ -58,6 +58,10 @@
        "\033[32~",
        "\033[33~",
        "\033[34~",     /* F20 */
+       "\033[35~",     /* F21 */
+       "\033[36~",     /* F22 */
+       "\033[37~",     /* F23 */
+       "\033[38~",     /* F24 */
 };
 
 static const char *vt100_pfkeys[] = {
@@ -86,11 +90,11 @@
        struct wsemul_vt100_emuldata *edp = cookie;
        static char c;
 
-       if (in >= KS_f1 && in <= KS_f20) {
+       if (in >= KS_f1 && in <= KS_f24) {
                *out = vt100_fkeys[in - KS_f1];
                return (5);
        }
-       if (in >= KS_F1 && in <= KS_F20) {
+       if (in >= KS_F1 && in <= KS_F24) {
                *out = vt100_fkeys[in - KS_F1];
                return (5);
        }

-- 
Creamy

Reply via email to