This page is orphaned, abandoned, and unmaintained.
No further updates will be made to this page, and accuracy is neither expected nor guaranteed. It is left in place solely for historical interest.
I have a keyboard which contains buttons for multimedia functions, such as "play", "stop", etc.
Using Debian GNU/Linux I wanted to map these buttons to control the software I use, thankfully this turned out to be simple. There is a package called 'xbindkeys' which allows you to specify programs to run when particular keys are pressed.
Configuring my keyboard to play music, skip tracks, etc was very simple because XMMS can be controlled from the command line to do a lot of things.
The following are the buttons I have on my keyboard, along with the commands which I have set xbindkeys to execute when I press them:
Action XMMS Command prev xmms --rew next xmms --fwd play xmms --play pause xmms --pause stop xmms --stop volume up ??? volume down ??? As you can see XMMS allows all the buttons to do something useful except change the volume. To do that I must use my mouse, or adjust the speakers.
After looking over the source to XMMS I was impressed at it's cleanliness. Adding the code to recognise two new options and make them work was very simple.
I patched three files to make two new command line options:
--vol-up (-l == Louder) --vol-down (-q == Quieter)The three diffs are available below.
Less than 1k of code, less than 30 minutes from source code download to working solution, thanks to all the people behind XMMS.
You may use this code under the terms of the original XMMS license (GPL).