int bksp_is_delete;
int rxvt_homeend;
int funky_type;
- int no_applic; /* totally disable application modes */
+ int no_applic_c; /* totally disable app cursor keys */
+ int no_applic_k; /* totally disable app keypad */
int app_cursor;
int app_keypad;
int nethack_keypad;
write_setting_i (sesskey, "BackspaceIsDelete", cfg->bksp_is_delete);
write_setting_i (sesskey, "RXVTHomeEnd", cfg->rxvt_homeend);
write_setting_i (sesskey, "LinuxFunctionKeys", cfg->funky_type);
- write_setting_i (sesskey, "NoApplicationKeys", cfg->no_applic);
+ write_setting_i (sesskey, "NoApplicationKeys", cfg->no_applic_k);
+ write_setting_i (sesskey, "NoApplicationCursors", cfg->no_applic_c);
write_setting_i (sesskey, "ApplicationCursorKeys", cfg->app_cursor);
write_setting_i (sesskey, "ApplicationKeypad", cfg->app_keypad);
write_setting_i (sesskey, "NetHackKeypad", cfg->nethack_keypad);
gppi (sesskey, "BackspaceIsDelete", 1, &cfg->bksp_is_delete);
gppi (sesskey, "RXVTHomeEnd", 0, &cfg->rxvt_homeend);
gppi (sesskey, "LinuxFunctionKeys", 0, &cfg->funky_type);
- gppi (sesskey, "NoApplicationKeys", 0, &cfg->no_applic);
+ gppi (sesskey, "NoApplicationKeys", 0, &cfg->no_applic_k);
+ gppi (sesskey, "NoApplicationCursors", 0, &cfg->no_applic_c);
gppi (sesskey, "ApplicationCursorKeys", 0, &cfg->app_cursor);
gppi (sesskey, "ApplicationKeypad", 0, &cfg->app_keypad);
gppi (sesskey, "NetHackKeypad", 0, &cfg->nethack_keypad);
IDC_KPNORMAL,
IDC_KPAPPLIC,
IDC_KPNH,
- IDC_NOAPPLIC,
+ IDC_NOAPPLICK,
+ IDC_NOAPPLICC,
IDC_CURSTATIC,
IDC_CURNORMAL,
IDC_CURAPPLIC,
cfg.funky_type == 2 ? IDC_FUNCXTERM :
cfg.funky_type == 3 ? IDC_FUNCVT400 :
IDC_FUNCTILDE );
- CheckDlgButton (hwnd, IDC_NOAPPLIC, cfg.no_applic);
+ CheckDlgButton (hwnd, IDC_NOAPPLICC, cfg.no_applic_c);
+ CheckDlgButton (hwnd, IDC_NOAPPLICK, cfg.no_applic_k);
CheckRadioButton (hwnd, IDC_CURNORMAL, IDC_CURAPPLIC,
cfg.app_cursor ? IDC_CURAPPLIC : IDC_CURNORMAL);
CheckRadioButton (hwnd, IDC_KPNORMAL, IDC_KPNH,
treeview_insert(&tvfaff, 0, "Terminal");
}
- /* The Keyboard panel. Accelerators used: [acgo] h?srvlxvnpmiet */
+ /* The Keyboard panel. Accelerators used: [acgo] h?srvlxvnpmietu */
{
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
beginbox(&cp, "Application keypad settings:",
IDC_BOX_KEYBOARD2, IDC_BOXT_KEYBOARD2);
checkbox(&cp,
- "Application ke&ypad and cursor keys totally disabled",
- IDC_NOAPPLIC);
+ "Application c&ursor keys totally disabled",
+ IDC_NOAPPLICC);
radioline(&cp, "Initial state of cursor keys:", IDC_CURSTATIC, 2,
"&Normal", IDC_CURNORMAL,
"A&pplication", IDC_CURAPPLIC, NULL);
+ checkbox(&cp,
+ "Application ke&ypad keys totally disabled",
+ IDC_NOAPPLICK);
radioline(&cp, "Initial state of numeric keypad:", IDC_KPSTATIC, 3,
"Nor&mal", IDC_KPNORMAL,
"Appl&ication", IDC_KPAPPLIC,
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.app_cursor = IsDlgButtonChecked (hwnd, IDC_CURAPPLIC);
break;
- case IDC_NOAPPLIC:
+ case IDC_NOAPPLICC:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.no_applic_c = IsDlgButtonChecked (hwnd, IDC_NOAPPLICC);
+ break;
+ case IDC_NOAPPLICK:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
- cfg.no_applic = IsDlgButtonChecked (hwnd, IDC_NOAPPLIC);
+ cfg.no_applic_k = IsDlgButtonChecked (hwnd, IDC_NOAPPLICK);
break;
case IDC_ALTF4:
if (HIWORD(wParam) == BN_CLICKED ||
/* Nastyness with NUMLock - Shift-NUMLock is left alone though */
if ( (cfg.funky_type == 3 ||
- (cfg.funky_type <= 1 && app_keypad_keys && !cfg.no_applic))
+ (cfg.funky_type <= 1 && app_keypad_keys && !cfg.no_applic_k))
&& wParam==VK_NUMLOCK && !(keystate[VK_SHIFT]&0x80)) {
wParam = VK_EXECUTE;
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)
+ if( left_alt || (app_keypad_keys && !cfg.no_applic_k
+ && cfg.funky_type != 2)
|| cfg.funky_type == 3 || cfg.nethack_keypad || compose_state )
{
if ((HIWORD(lParam)&KF_EXTENDED) == 0)
if ( cfg.funky_type == 3 ||
( cfg.funky_type <= 1 &&
- app_keypad_keys && !cfg.no_applic)) switch(wParam) {
+ app_keypad_keys && !cfg.no_applic_k)) 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) {
+ if(app_keypad_keys && !cfg.no_applic_k) switch(wParam) {
case VK_NUMPAD0: xkey = 'p'; break;
case VK_NUMPAD1: xkey = 'q'; break;
case VK_NUMPAD2: xkey = 'r'; break;
{
if (vt52_mode)
p += sprintf((char *)p, "\x1B%c", xkey);
- else if (app_cursor_keys && !cfg.no_applic)
+ else if (app_cursor_keys && !cfg.no_applic_c)
p += sprintf((char *)p, "\x1BO%c", xkey);
else
p += sprintf((char *)p, "\x1B[%c", xkey);