mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
GTK: Handle Shift+Tab properly.
According to https://mail.gnome.org/archives/gtk-list/1999-August/msg00145.html pressing Shift+Tab generates a special keyval of ISO_Left_Tab, without a GDK_SHIFT_MASK applied. We now handle this case so that the midend receives ('\t' | MOD_SHFT) as intended. This will be used by the upcoming Untangle keyboard interface.
This commit is contained in:

committed by
Simon Tatham

parent
3f8ef29078
commit
b50a95807a
5
gtk.c
5
gtk.c
@ -1541,6 +1541,11 @@ static gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
|||||||
keyval = '\177';
|
keyval = '\177';
|
||||||
else if ((event->keyval == 'z' || event->keyval == 'Z') && shift && ctrl)
|
else if ((event->keyval == 'z' || event->keyval == 'Z') && shift && ctrl)
|
||||||
keyval = UI_REDO;
|
keyval = UI_REDO;
|
||||||
|
else if (event->keyval == GDK_KEY_ISO_Left_Tab) {
|
||||||
|
/* SHIFT+TAB gets special handling. Ref:
|
||||||
|
* https://mail.gnome.org/archives/gtk-list/1999-August/msg00145.html */
|
||||||
|
keyval = '\t' | MOD_SHFT;
|
||||||
|
}
|
||||||
else if (event->string[0] && !event->string[1])
|
else if (event->string[0] && !event->string[1])
|
||||||
keyval = (unsigned char)event->string[0];
|
keyval = (unsigned char)event->string[0];
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user