-
Audacious has some plugins which just work magically!
Open an X terminal and run the xev utility. Press the special buttons on your keyboard. If nothing happened (the keys don’t produce a reaction) you’re out of luck. X doesn’t recognize those keys at all. If a reaction appears, watch for the line that contains keycode. It should have a part saying keysym next to it. It may offer a hex code (ie. 0x61) and a keysym name (ie. Next) or it may say 0x0 NoSymbol. If it offers you a keysym name, you can simply use that in bbkeys or the keygrabber utility of your choice; just use xev some more to gather all the names you need.
If you don’t get a keysym, all is not lost; you still have a keycode and you can map it to a name that X doesn’t use. Look in /usr/X11R6/lib/X11/XKeysymDB for such names; there are some that look like XF86AudioPlay and such which are just right for this. Pick one and the keycode you got from xev and use the xmodmap utility to join them together. The best practice is to create an ~/.Xmodmap file, put xmodmap commands in there, and run xmodmap ~/.Xmodmap when you start X. In this case, the magic command would be this: keycode 138 = XF86AudioPlay (adjust as needed). To run xmodmap ~/.Xmodmap automatically, put it in your ~/.xinitrc or ~/.Xsession. After it loads, you can use the new key name in bbkeys.

ported