Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've used this python script to disable iTunes from launching when one of the media keys has been pressed. However, when I want to use it with Spark it doesn't respond to the media keys as input for a hotkey.

Basically it doesn't have to be Spark, but I'd like to map shell commands to my mediakeys instead. How can I do this?

Thanks! Dennis

share|improve this question
up vote 3 down vote accepted

You can't. They are intercepted before any application can register that a key has been pressed. The python script replaces the actual iTunes binary because there's no other way to do this!

You don't get an additional 12 keys by (not) pressing Fn.

(they also cannot be pressed programmatically, e.g. AppleScript's key code or keystroke commands!)

If you don't use the F-keys otherwise, consider using them (instead of media key functionality).

enter image description here

To use some keys as standard function keys, others as media/special keys, use FunctionFlip.

share|improve this answer
Daniel Beck is the winner! Works great for me :D – FLX Feb 10 '11 at 23:59

Yep, you can. Here's a google translate page explaining it, from Lifehacker.

share|improve this answer
This patches a core service to not dispatch a call to iTunes. He doesn't get freely assignable keys this way, which is what the question is about. – Daniel Beck Feb 11 '11 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .