I want to listen to the key press of lets say Ctrl+W in Rhythmbox, and call a functions if that happens. How can I do that in Python ?
|
I assume that you are creating some sort of plugin. Plugins can be written in C or Python. I don't know how to do this but I know where you could possibly find out this information:
|
|||
|
|
|
Here's a base to get started:
The two important bits are defining the function, see the API docs for what arguments it should accept, and connecting the signal to it. Again, the API lists those signals. If you want to catch a signal defined in RBPlayer, for example, you'd connect yoru session bus to Player, instead of Shell. Unfortunately, the API is rather complex and not easily explained here. Have a good rummage through the Documentation, and you'll probably find what you need. |
|||||||
|
