Recently I got myself a new keyboard which has a few media buttons on it. To my surprise, they worked out of the box under gnome (for some reason KDE doesn't catch the keys under the keyboard shortcut section, but gnome was more or less pre configured :?). For example, there is a play/pause button on the keyboard, and whenever I press it my audio program, whether it is listen, rhythmbox, or totem, pauses - just like magic.
Now, I've been fiddling around a little with bluemote, and would like to write a simple bash script that does precisely what that play/pause button does, so that I can call it via bluemote. But I have no clue of how to do that. I know KDE has the whole dcop thing, but isn't there anything similar for gnome?
I've been screwing around with those multimedia keys aswell. There's a tool (I can't remember the name) that catches the keycodes (if any). Then you can combine the keycode with a special action, like "mpc next" and the action is executed when you press the button.
I wish I still knew the names of those programs. What you could do, though, is find out the keycodes and then connect each one with a simple script (nextsong.sh or something) that checks which music player is playing and then issues the correct command.
I think that would work for any WM/DE and even without X.
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
xev to get keycodes, xbindkeys can automatically grab keycodes and bind them.
grab xbindkeys_config for an easy xbindkeys config tool.
thanks. i'll look into this.