Hi, I have a very simgle script: print("script startup") registerShortcut("Register Desc", "cool", "Meta+B", function() { "got key" }) I start the script using: qdbus-qt4 org.kde.kwin /Scripting loadScript PATH_TO_SCRIPT qdbus-qt4 org.kde.kwin /0 run # where 0 is the ID returned by the previous command At this stage I notice "script startup" logged by kwin, however upon pressing "Meta+B" I get absolutely nothing. I don't know whether the shortcut would start working after packaging my script as a plasma package... at this stage I am just in the testing stage and being able to quickly unload and reload my script is essential. I am able to connect to other signals and get output only registerShortcut seems to be broken for me.
Sorry I messed up that script after pasting it, it should read: print("script startup") registerShortcut("Script Binding Test", "test", "Meta+B", function() { print("got key") })
Here is the results of calling "registerShortcut" 4 times to my kglobalshortcutsrc (each time with a slightly different title): Script Test1=,Meta+B,cool Script Test2=Meta+B,Meta+B,cool Script Test3=,Meta+B,cool Script Test4=,Meta+B,cool Now strangely enough the time I registered it with "Script Test2" the key binding actually worked. Seems random as to what type of entry it creates. Also... seems kinda weird I get all these duplicate entries in that file just from registering script shortcuts but I guess that's okay.
seems like a worksforme. The global shortcut system is not very good and not really suited for rapid prototyping of scripts. You need to ensure in the global shortcut editor that the keybinding is actually registered.
I have found the actual issue, I guess I'll open a new bug for it.
*** Bug 318383 has been marked as a duplicate of this bug. ***