• Martin Flöser's avatar
    Ensure modifier locks and latches don't trigger the mod only shortcut · ec98f498
    Martin Flöser authored
    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
keyboard_input.cpp 19.5 KB