Commit f47f41b7 authored by Martin Blanchard's avatar Martin Blanchard

shortcuts: Ignore Shift modifier if not impacting key value

Some keyboard layouts may require the use of the Shift modifier in order
to access certain keys and this breaks shortcuts using these keys.

GNOME/libdazzle#15
parent a58041f9
......@@ -114,6 +114,10 @@ dzl_shortcut_chord_new_from_event (const GdkEventKey *key)
self->keys[0].keyval = gdk_keyval_to_lower (key->keyval);
self->keys[0].modifier = sanitize_modifier_mask (key->state);
if ((key->state & GDK_SHIFT_MASK) != 0 &&
self->keys[0].keyval == key->keyval)
self->keys[0].modifier &= ~GDK_SHIFT_MASK;
if ((key->state & GDK_LOCK_MASK) == 0 &&
self->keys[0].keyval != key->keyval)
self->keys[0].modifier |= GDK_SHIFT_MASK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment