Use keyboard media keys with org.gnome.SettingsDaemon (or other way)



Hello,

I'm working on a small script which aims to play some songs.
I would like to intercept keyboard media keys such as play/pause, previous, next, ... to control the current played song.

What is the best way to do that ?
I tried to connect a function to the signal 'MediaPlayerKeyPressed' of org.gnome.SettingsDaemon. But it seems to not be enough.

Do I have to use Grab/ReleaseMediaPlayerKeys ?
If so, how does it works ? What are the two parameters 'application' and 'time' of the method GrabMediaPlayerKeys ?

Thanks,

Baptiste.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]