1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
|
}
else if (compose_state==1 && wParam != VK_CONTROL)
compose_state = 0;
} else
compose_state = 0;
/* Nastyness with NUMLock - Shift-NUMLock is left alone though */
if ( (cfg.funky_type == 3 || (cfg.funky_type <= 1 && app_keypad_keys))
&& wParam==VK_NUMLOCK && !(keystate[VK_SHIFT]&0x80)) {
wParam = VK_EXECUTE;
/* UnToggle NUMLock */
if ((HIWORD(lParam)&(KF_UP|KF_REPEAT))==0)
keystate[VK_NUMLOCK] ^= 1;
|
|
>
|
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
|
}
else if (compose_state==1 && wParam != VK_CONTROL)
compose_state = 0;
} else
compose_state = 0;
/* Nastyness with NUMLock - Shift-NUMLock is left alone though */
if ( (cfg.funky_type == 3 ||
(cfg.funky_type <= 1 && app_keypad_keys && !cfg.no_applic))
&& wParam==VK_NUMLOCK && !(keystate[VK_SHIFT]&0x80)) {
wParam = VK_EXECUTE;
/* UnToggle NUMLock */
if ((HIWORD(lParam)&(KF_UP|KF_REPEAT))==0)
keystate[VK_NUMLOCK] ^= 1;
|
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
|
/* Make sure we're not pasting */
if (key_down) term_nopaste();
if (compose_state>1 && left_alt) compose_state = 0;
/* Sanitize the number pad if not using a PC NumPad */
if( left_alt || (app_keypad_keys && cfg.funky_type != 2)
|| cfg.funky_type == 3 || cfg.nethack_keypad || compose_state )
{
if ((HIWORD(lParam)&KF_EXTENDED) == 0)
{
int nParam = 0;
switch(wParam)
{
|
|
|
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
|
/* Make sure we're not pasting */
if (key_down) term_nopaste();
if (compose_state>1 && left_alt) compose_state = 0;
/* Sanitize the number pad if not using a PC NumPad */
if( left_alt || (app_keypad_keys && !cfg.no_applic && cfg.funky_type != 2)
|| cfg.funky_type == 3 || cfg.nethack_keypad || compose_state )
{
if ((HIWORD(lParam)&KF_EXTENDED) == 0)
{
int nParam = 0;
switch(wParam)
{
|
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
|
}
/* Application Keypad */
if (!left_alt) {
int xkey = 0;
if ( cfg.funky_type == 3 ||
( cfg.funky_type <= 1 && app_keypad_keys)) switch(wParam) {
case VK_EXECUTE: xkey = 'P'; break;
case VK_DIVIDE: xkey = 'Q'; break;
case VK_MULTIPLY:xkey = 'R'; break;
case VK_SUBTRACT:xkey = 'S'; break;
}
if(app_keypad_keys) switch(wParam) {
case VK_NUMPAD0: xkey = 'p'; break;
case VK_NUMPAD1: xkey = 'q'; break;
case VK_NUMPAD2: xkey = 'r'; break;
case VK_NUMPAD3: xkey = 's'; break;
case VK_NUMPAD4: xkey = 't'; break;
case VK_NUMPAD5: xkey = 'u'; break;
case VK_NUMPAD6: xkey = 'v'; break;
|
|
>
|
|
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
|
}
/* Application Keypad */
if (!left_alt) {
int xkey = 0;
if ( cfg.funky_type == 3 ||
( cfg.funky_type <= 1 &&
app_keypad_keys && !cfg.no_applic)) switch(wParam) {
case VK_EXECUTE: xkey = 'P'; break;
case VK_DIVIDE: xkey = 'Q'; break;
case VK_MULTIPLY:xkey = 'R'; break;
case VK_SUBTRACT:xkey = 'S'; break;
}
if(app_keypad_keys && !cfg.no_applic) switch(wParam) {
case VK_NUMPAD0: xkey = 'p'; break;
case VK_NUMPAD1: xkey = 'q'; break;
case VK_NUMPAD2: xkey = 'r'; break;
case VK_NUMPAD3: xkey = 's'; break;
case VK_NUMPAD4: xkey = 't'; break;
case VK_NUMPAD5: xkey = 'u'; break;
case VK_NUMPAD6: xkey = 'v'; break;
|
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
|
case VK_LEFT: xkey = 'D'; break;
case VK_CLEAR: xkey = 'G'; break;
}
if (xkey)
{
if (vt52_mode)
p += sprintf((char *)p, "\x1B%c", xkey);
else if (app_cursor_keys)
p += sprintf((char *)p, "\x1BO%c", xkey);
else
p += sprintf((char *)p, "\x1B[%c", xkey);
return p - output;
}
}
|
|
|
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
|
case VK_LEFT: xkey = 'D'; break;
case VK_CLEAR: xkey = 'G'; break;
}
if (xkey)
{
if (vt52_mode)
p += sprintf((char *)p, "\x1B%c", xkey);
else if (app_cursor_keys && !cfg.no_applic)
p += sprintf((char *)p, "\x1BO%c", xkey);
else
p += sprintf((char *)p, "\x1B[%c", xkey);
return p - output;
}
}
|