Add support for modifier only shortcuts on Wayland

Review Request #124954 - Created Aug. 27, 2015 and submitted

Information
Martin Flöser
kwin
master
fbf7ccb...
Reviewers
kwin, plasma
hanschen
On popular demand!

This change tracks how modifiers are used and detects a modifier only
key press/release. That is:
* no other key is pressed when the modifier gets pressed
* no other key gets pressed before the modifier gets released

If such a press/release is detected, we call a configurable dbus call.
The possible shortcuts can be configured in kwinrc, group
"ModifierOnlyShortcuts". The following keys are supported:
* Shift
* Control
* Alt
* Meta

As value it takes a QStringList (comma seperated string) with
service,path,interface,method,additionalargs

E.g. to invoke Desktop Grid effect on Meta key:

[ModifierOnlyShortcuts]
Meta=org.kde.kglobalaccel,/component/kwin/,org.kde.kglobalaccel.Component,invokeShortcut,ShowDesktopGrid

I do not intend to add a config interface for it. Let's keep it a hidden
way.

  
Thomas Pfeiffer
Sebastian Kügler
Thomas Lübking
Martin Flöser
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 07414e88a5dca8abe00e555b9ea94189b429a5c6 by Martin Gräßlin to branch master.
Loading...