mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter/evdev: Don't ignore CAPS lock as modifier
Mark CAPS lock as a modifier (as it should) so that when using XKB
options to change the default behaviour of CAPS lock, the new assigned
key can by used as a sticky key as well.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/112
(cherry picked from commit 6df2b7af55
)
This commit is contained in:
parent
c7a38c3139
commit
2dd9fc17c1
@ -433,6 +433,8 @@ key_event_is_modifier (ClutterEvent *event)
|
|||||||
case XKB_KEY_Super_R:
|
case XKB_KEY_Super_R:
|
||||||
case XKB_KEY_Hyper_L:
|
case XKB_KEY_Hyper_L:
|
||||||
case XKB_KEY_Hyper_R:
|
case XKB_KEY_Hyper_R:
|
||||||
|
case XKB_KEY_Caps_Lock:
|
||||||
|
case XKB_KEY_Shift_Lock:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -584,6 +586,12 @@ handle_stickykeys_press (ClutterEvent *event,
|
|||||||
}
|
}
|
||||||
|
|
||||||
depressed_mods = xkb_state_serialize_mods (seat->xkb, XKB_STATE_MODS_DEPRESSED);
|
depressed_mods = xkb_state_serialize_mods (seat->xkb, XKB_STATE_MODS_DEPRESSED);
|
||||||
|
/* Ignore the lock modifier mask, that one cannot be sticky, yet the
|
||||||
|
* CAPS_LOCK key itself counts as a modifier as it might be remapped
|
||||||
|
* to some other modifier which can be sticky.
|
||||||
|
*/
|
||||||
|
depressed_mods &= ~CLUTTER_LOCK_MASK;
|
||||||
|
|
||||||
new_latched_mask = device->stickykeys_latched_mask;
|
new_latched_mask = device->stickykeys_latched_mask;
|
||||||
new_locked_mask = device->stickykeys_locked_mask;
|
new_locked_mask = device->stickykeys_locked_mask;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user