]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Shift-Tab now sends ESC [ Z
authorSimon Tatham <anakin@pobox.com>
Mon, 13 Mar 2000 14:45:32 +0000 (14:45 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 13 Mar 2000 14:45:32 +0000 (14:45 +0000)
[originally from svn r408]

window.c

index e85cb024c15d1e2af03574f72fec83245f2670da..a7aeb1fc4dbb4b47fbbf786a92a968e7a36a8c63 100644 (file)
--- a/window.c
+++ b/window.c
@@ -1432,6 +1432,16 @@ static int TranslateKey(WPARAM wParam, LPARAM lParam, unsigned char *output) {
        }
     }
 
+    /*
+     * Shift-Tab should send ESC [ Z.
+     */
+    if (ret && (keystate[VK_SHIFT] & 0x80) && wParam == '\t') {
+        *p++ = 0x1B;                   /* ESC */
+        *p++ = '[';
+        *p++ = 'Z';
+       return p - output;
+    }
+
     /*
      * Before doing Windows charmap translation, remove LeftALT
      * from the keymap, since its sole effect should be to prepend