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

link|improve this question

feedback

2 Answers

up vote 2 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.

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

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

link|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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.