summaryrefslogtreecommitdiff
path: root/plugins/gtkui/hotkeys.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-15 22:06:34 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-09-15 22:06:34 +0200
commit1a9c8ba4b17d65e140a9266b35cb956d2b5e8627 (patch)
tree587075cea2c3469b90d92e21c4ef07237d519479 /plugins/gtkui/hotkeys.c
parent346d39ad0f8c721704f3422a35cef2dffd6304ea (diff)
gtkui: keygroup (layout) independent hotkeys
Diffstat (limited to 'plugins/gtkui/hotkeys.c')
-rw-r--r--plugins/gtkui/hotkeys.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c
index 6e710f4a..142b0164 100644
--- a/plugins/gtkui/hotkeys.c
+++ b/plugins/gtkui/hotkeys.c
@@ -714,12 +714,9 @@ on_hotkeys_set_key_key_press_event (GtkWidget *widget,
cleared = FALSE;
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (display),
- event->hardware_keycode,
- event->state,
- event->group,
- NULL, NULL, NULL, &consumed_modifiers);
+ event->hardware_keycode, event->state,
+ 0, &accel_key, NULL, NULL, &consumed_modifiers);
- accel_key = gdk_keyval_to_lower (event->keyval);
if (accel_key == GDK_ISO_Left_Tab)
accel_key = GDK_Tab;
@@ -731,8 +728,11 @@ on_hotkeys_set_key_key_press_event (GtkWidget *widget,
/* Put shift back if it changed the case of the key, not otherwise.
*/
- if (accel_key != event->keyval)
+ int lower = gdk_keyval_to_lower (accel_key);
+ if (lower != accel_key) {
+ accel_key = lower;
accel_mods |= GDK_SHIFT_MASK;
+ }
char name[1000];
gtk_button_set_label (GTK_BUTTON (widget), _(""));