Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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