]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Under OS X Leopard, we seem not to consistently get the Tab key
authorSimon Tatham <anakin@pobox.com>
Sun, 9 Mar 2008 15:32:20 +0000 (15:32 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 9 Mar 2008 15:32:20 +0000 (15:32 +0000)
translated for us. Be prepared to do it manually as a fallback.

[originally from svn r7913]

unix/gtkwin.c

index a377ad65cf6e1506e65f10c4d3eab7cf42db07c7..d31037b6cd37264b56a10aa7c041f1761e241c9a 100644 (file)
@@ -723,6 +723,13 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
            end = 1 + sprintf(output+1, "\033[Z");
            use_ucsoutput = FALSE;
        }
+       /* And normal Tab is Tab, if the keymap hasn't already told us.
+        * (Curiously, at least one version of the MacOS 10.5 X server
+        * doesn't translate Tab for us. */
+       if (event->keyval == GDK_Tab && end <= 1) {
+           output[1] = '\t';
+           end = 2;
+       }
 
        /*
         * NetHack keypad mode.