I\'ve been using the methods described here: http://weblog.rogueamoeba.com/2007/09/29/
and read this thread: Binding to Media keys on Apple keyboards under OSX 10.5
I found a pre-existing class that will do this: http://overooped.com/post/2593597587/mediakeys
Wow, that took some looking to find! Hope it helps someone else!