From d7eda6d99cb6b7c2e09489dcf13b23c4cfcc61a2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 9 Mar 2008 15:32:20 +0000 Subject: [PATCH] Under OS X Leopard, we seem not to consistently get the Tab key translated for us. Be prepared to do it manually as a fallback. [originally from svn r7913] --- unix/gtkwin.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/unix/gtkwin.c b/unix/gtkwin.c index a377ad65..d31037b6 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -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.