Registered Member
|
In 1.4, by using the KDE keyboard actions (khotkeys or something like that) and a short script which sent out dcop commands, I was able to map the 1 to 0 keys to play the 1st through 10th track in a playlist and stop after that track.
I couldn't find dbus commands to do the same thing. So I wrote a qScript that does almost all of what I want, and added actions to the tools menu. I can temporarily add a keyboard shortcut to the action. But as soon as amarok restarts, that mapping is gone. How can I get my customized functionality back in version 2? Currently I'm running a 2.2 beta. |
Registered Member
|
i just tried adding a keyboard shortcut to a script i'm writing and it works fine for me, even after restarting Amarok (using version 2.2rc1).
it's a bit difficult to help more without knowing exactly what your doing. maybe you should try re-posting your question in the Development forum and show the actual code that your trying to run. |
Registered Member
|
I was setting the shortcut via the "Configure Shortcuts..." menu item.
If you're setting the shortcut within the script, I'd like to know how you do that. That would be an excellent solution. I just haven't figured out how it's done. |
Registered Member
|
Ah, that explains it! Try something like this: if (Amarok.Window.addToolsMenu('MenuItem1', 'MyApp', 'Icon')) { menu_item = Amarok.Window.ToolsMenu.MenuItem1; menu_item['triggered()'].connect(someFunction); menu_item.setShortcuts([new QKeySequence('Ctrl+1')]); } HTH |
Registered Member
|
Thanks.
p.s. I also had to import qt.gui. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]