Reverse part of RDB's pedantic patch from rev 1.129 [r1105]: app
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 15 Dec 2001 11:49:48 +0000 (11:49 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 15 Dec 2001 11:49:48 +0000 (11:49 +0000)
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.

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

window.c

index a8fe7ab..1b61b6c 100644 (file)
--- 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;