Diffusion KWin ec98f498e820

Ensure modifier locks and latches don't trigger the mod only shortcut

Authored by graesslin on Aug 17 2016, 6:39 AM.

Description

Ensure modifier locks and latches don't trigger the mod only shortcut

Summary:
If caps lock is on the shift key should not trigger. Similar pressing
caps lock should neither on activation press nor on deactivation press
trigger the shortcut. Related to that are latched modifiers aka sticky
modifiers: if the modifier is still on after releasing the key the
shortcut should not trigger. We must assume the user wanted to use the
modifier to activate the modifier, not to activate the shortcut.

This change ensures that we don't track for modifier only shortcuts if
a modifier is active before press or after release.

The added test case demonstrates for caps lock, latched modifiers is
currently still untested. (Needs a way to mock it).

Test Plan: See test case for caps lock.

Reviewers: KWin, Plasma

Subscribers: kwin

Tags: KWin

Differential Revision: https://phabricator.kde.org/D2467