On my Dell laptop I use xbindkeys for my media keys (Play, Pause, Volume Up/Down, etc). You can find the key code for the media keys in the 'xev' just type in 'xev' into a terminal, push a media key and watch for the ouput in the terminal and add it to your .xbindkeysrc.
Or you can type in 'xbindkeys -k' and then push your media button, it will give you exactly what to put into your .xbindkeysrc (except the part with "(Scheme function)", replace that with what you want to execute, for example if you want volume up, "amixer -q set Master 2+ unmute") and add it to your .xbindkeysrc.
I'm not sure if this is exactly what you are looking for, but I hope it helped in a way.