Bug 318422 - Improved shortcut handling for scripting
Summary: Improved shortcut handling for scripting
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 4.10.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 05:52 UTC by Martin Flöser
Modified: 2013-11-12 13:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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