The Hijack ioctl() interface (see the hijack.h file in the kernel sources) has a means of intercepting nearly all button presses.
As for the priority -- if you are willing to have the music playback "stutter", then you can have Linux move your process/thread into a real-time scheduling class, similar to the player software. I think this is done via "sched_setparam(2)" -- try "man sched_setparam" on a Linux box. The real-time classes are SCHED_FIFO and SCHED_RR (round-robin), with several priority levels to choose from (any will do here).
Cheers