SCO function key mode now affects the small keypad (Ins, Del, etc)
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 4 Aug 2001 14:35:58 +0000 (14:35 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 4 Aug 2001 14:35:58 +0000 (14:35 +0000)
in accordance with the keymap dump sent by Len Christiansen.

git-svn-id: svn://svn.tartarus.org/sgt/putty@1169 cda61777-01e9-0310-a592-d414129be87e

window.c

index 546a917..3d4f080 100644 (file)
--- a/window.c
+++ b/window.c
@@ -2758,7 +2758,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
            return p - output;
        }
 
-       if (cfg.funky_type == 5 && code >= 11 && code <= 34) {
+       if (cfg.funky_type == 5 &&     /* SCO function keys */
+           code >= 11 && code <= 34) {
            char codes[] = "MNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@[\\]^_`{";
            int index = 0;
            switch (wParam) {
@@ -2780,6 +2781,16 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
            p += sprintf((char *) p, "\x1B[%c", codes[index]);
            return p - output;
        }
+       if (cfg.funky_type == 5 &&     /* SCO small keypad */
+           code >= 1 && code <= 6) {
+           char codes[] = "HL.FIG";
+           if (code == 3) {
+               *p++ = '\x7F';
+           } else {
+               p += sprintf((char *) p, "\x1B[%c", codes[code-1]);
+           }
+           return p - output;
+       }
        if ((vt52_mode || cfg.funky_type == 4) && code >= 11 && code <= 24) {
            int offt = 0;
            if (code > 15)