Bug 318422

Summary: Improved shortcut handling for scripting
Product: [Plasma] kwin Reporter: Martin Flöser <mgraesslin>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: github, moraru69
Priority: NOR    
Version: 4.10.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Martin Flöser 2013-04-16 05:52:52 UTC
The global shortcut framework is rather limited and a huge problem especially for rapid prototyping of KWin scripts. Each time the register shortcut command is executed with a different name a new shortcut is registered, there is no feedback that a shortcut is already taken and so on and on.

Possible solutions to this problem:
* if executed over scripting console the shortcuts get discarded on script unload
* if executed as a proper script the conflicting shortcut dialog message gets shown
* API hook to discard a shortcut
Comment 1 github 2013-04-16 08:31:02 UTC
* When using "registerShortcut" with the same name but a different key-sequence to that which was used before, the new key-sequence is entered into the "Alt key sequence" space in kglobalshortcutsrc and fails to work. Each time the sequence is changed via script the "alt" is overridden but the binding still will not work.
Comment 2 Lilian A. Moraru 2013-11-12 13:46:05 UTC
KDE 4.11.2.
The problem is still present. You can observe it when you activate and deactivate desktop effects that have overlapping shortcuts.
When you activate the second effect with an overlapping shortcut only the first one registered will work. Also, when both are activated and you deactivate the effect that is registered, the second effect doesn't keep the shortcut.
Video demonstration: http://www.youtube.com/watch?v=yQTw_Kjbta4