From f10f7c966acfa2779b6184ada52b8d37be1160af Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 15 Dec 2001 11:49:48 +0000 Subject: [PATCH] Reverse part of RDB's pedantic patch from rev 1.129 [r1105]: app cursor and app keypad modes are now once again independently switchable. The VT100 and VT102 manuals may have done it RDB's way as he said, but xterm and rxvt disagree and at least one app depends on the xterm way. It'll have to become a configurable option if anyone has trouble with this. [originally from svn r1495] [r1105 == 9f32a1da351fc81729aa943aaceb89b2e8cf3f0c] --- window.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/window.c b/window.c index a8fe7ab5..1b61b6c6 100644 --- a/window.c +++ b/window.c @@ -3504,11 +3504,24 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, p += sprintf((char *) p, "\x1B%c", xkey); else { int app_flg = (app_cursor_keys && !cfg.no_applic_c); - /* VT100 & VT102 manuals both state the app cursor keys - * only work if the app keypad is on. +#if 0 + /* + * RDB: VT100 & VT102 manuals both state the + * app cursor keys only work if the app keypad + * is on. + * + * SGT: That may well be true, but xterm + * disagrees and so does at least one + * application, so I've #if'ed this out and the + * behaviour is back to PuTTY's original: app + * cursor and app keypad are independently + * switchable modes. If anyone complains about + * _this_ I'll have to put in a configurable + * option. */ if (!app_keypad_keys) app_flg = 0; +#endif /* Useful mapping of Ctrl-arrows */ if (shift_state == 2) app_flg = !app_flg;