emphatic does both of the things you're talking about. Go to my empeg page (in my .sig) and download the emphatic 1.10 source. The setschedparam stuff is towards the top of emphatic.c, and the means of optionally blocking/sending input events is sprinkled throughout.. Basically, you bind all the buttons you want to trap, and inject all the ones you want to send (or unbind from them, in the case you no longer need to receive them at all.)

Incidentally, I'm not sure setting your scheduler / priority is going to necessarily give you the results you want.. But it's worth a shot.
_________________________
- Tony C
my empeg stuff