Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On a Mac, when one presses the Press/Play media key (F8), and no application intercepts that key, it opens iTunes and starts playing. Is there any way to get it to open another app? In my case, I want it to open Spotify. Bonus if it's possible to get it to start playing on launch (Maybe AppleScript is the way to go for this?)

share|improve this question
@Lri my question is not a duplicate. I want to know how to make it open Spotify, not just how to keep it from opening iTunes. – Wuffers Nov 18 '11 at 11:16

3 Answers 3

You might find this useful, too. How to prevent iTunes from launching on media key press

Spotify should respond to F8 by default. How do you get the awesome key icon?

share|improve this answer
All you do is surround the key you want to make into an icon like that with the <kb> HTML tag. – Wuffers Nov 17 '11 at 11:15
And Spotify does respond to F8, but only when it's running. What I want to know is how to make this key launch Spotify if neither it not iTunes are running. – Wuffers Nov 17 '11 at 11:17
Ohh. Hm. Good question! – tekknolagi Nov 18 '11 at 8:45

I would add a custom Keyboard Shortcut to your Function Keys F8-F12.

Normally you would access these function keys by holding fn and the associated Media Key. For example F8 = fn + (Play/Pause on newer Macbook Pros)

In order to make the function keys, rather than their media key functionality, default I would use Function Flip (Free)

share|improve this answer
Or to disable the special key functionality, go into System Preferences -> Keyboard and check "Use All F1, F2, etc, keys as standard function keys". And Voila, they now start showing up as F1, F2, F3, etc... – Benjamin Schollnick Jun 9 '12 at 11:09

To open Spotify and play a song on launch you could do this in AppleScript:

tell application "Spotify"
    play track "spotify:track:trackURI"
end tell

Export this script as an Application with the option "Save as executable script" (or something similar).

Then, to map your f8 key to this script, go to System Preferences, and then under "Keyboard" enable "Use All F1, F2, etc, keys as standard function keys". For the next step, you need to switch to the "Keyboard Shortcuts" tab and add a new Keyboard Shorcut under Applications that will open the AppleScript. (If I remember correctly, you have to reboot your computer or log out for the changes to take place)

share|improve this answer

Your Answer


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.