mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
SCO function key mode now affects the small keypad (Ins, Del, etc)
in accordance with the keymap dump sent by Len Christiansen. [originally from svn r1169]
This commit is contained in:
parent
4a0fb28883
commit
dbe881a163
13
window.c
13
window.c
@ -2758,7 +2758,8 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
return p - output;
|
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@[\\]^_`{";
|
char codes[] = "MNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@[\\]^_`{";
|
||||||
int index = 0;
|
int index = 0;
|
||||||
switch (wParam) {
|
switch (wParam) {
|
||||||
@ -2780,6 +2781,16 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
|
|||||||
p += sprintf((char *) p, "\x1B[%c", codes[index]);
|
p += sprintf((char *) p, "\x1B[%c", codes[index]);
|
||||||
return p - output;
|
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) {
|
if ((vt52_mode || cfg.funky_type == 4) && code >= 11 && code <= 24) {
|
||||||
int offt = 0;
|
int offt = 0;
|
||||||
if (code > 15)
|
if (code > 15)
|
||||||
|
Loading…
Reference in New Issue
Block a user