Trigger global shortcuts also on key-repeat

Summary:
Restores feature parity with X11. Global shortcuts need to trigger
also for repeat events. An example is the volume key or screen
brightness.

For other shortcuts like showing yakuake it does not make sense to
trigger on repeat. Thus a long term solution is to add a flag to
global shortcuts whether the key should trigger on repeat.

BUG: 366608

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2413
This commit is contained in:
Martin Gräßlin 2016-08-12 07:45:31 +02:00
parent 142aab2e24
commit 1111b9c98b

View file

@ -416,7 +416,7 @@ public:
return input()->shortcuts()->processAxis(event->modifiers(), direction);
}
bool keyEvent(QKeyEvent *event) override {
if (event->type() == QEvent::KeyPress && !event->isAutoRepeat()) {
if (event->type() == QEvent::KeyPress) {
return input()->shortcuts()->processKey(event->modifiers(), event->nativeVirtualKey());
}
return false;