diff options
| author | Franklin Wei <franklin@rockbox.org> | 2024-07-21 04:55:01 -0400 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2024-07-31 23:29:00 +0100 |
| commit | b50a95807ab1248c68b213cc9c2b43ea0bbce0f5 (patch) | |
| tree | 4e14512cb6535a53d91f4e82e1581b3b3e0f0eb2 | |
| parent | 3f8ef290786fbaf7b9ec200a2fd598eb324c6b0c (diff) | |
| download | puzzles-b50a95807ab1248c68b213cc9c2b43ea0bbce0f5.zip puzzles-b50a95807ab1248c68b213cc9c2b43ea0bbce0f5.tar.gz puzzles-b50a95807ab1248c68b213cc9c2b43ea0bbce0f5.tar.bz2 puzzles-b50a95807ab1248c68b213cc9c2b43ea0bbce0f5.tar.xz | |
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.
| -rw-r--r-- | gtk.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1541,6 +1541,11 @@ static gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data) keyval = '\177'; else if ((event->keyval == 'z' || event->keyval == 'Z') && shift && ctrl) 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]) keyval = (unsigned char)event->string[0]; else |