![]() Registered Member ![]()
|
Hello,
I'm working on my first plasmoid and I got into problems from very beginning ![]() My goal is that the plasmoid should do something when certain keyboard shortcut is pressed. I can see in the plasmoid configuration that there is a dialog for the shortcut configuration. But how I can handle the event from keyboard in the plasmoid code? I can't find any API for that ![]() I guess there will be some signal for this, which I can bind to some function I create? I'm developing the plasmoid in Python, but that doesn't matter for me, I can switch to cpp if needed. But I presume that the API could be same for both, isn't? Thanks you guys for hints! |
![]() Administrator ![]()
|
While i'm not sure how you can bind to that shortcut - it sounds like you are after a global shortcut.
You can use the KGlobalAccel class to register and interact with global shortcuts - http://api.kde.org/4.x-api/kdelibs-apid ... Accel.html
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], blue_bullet, Google [Bot], Yahoo [Bot]