Modern Mac keyboards are outfitted with a number of extra function keys. Using those, you can instantly adjust your volume, screen brightness, or command media playback.

There’s only one problem. Although they are essentially compatible with all applications, as a ‘feature’, these media keys automatically launch and start playing songs from iTunes. Even when you’re using them in another application.

And there’s absolutely no easy way to turn it off. Most call it a bug, but Apple calls it a feature, and they don’t seem to be planning to release a fix for this iTunes problem anytime soon. Over the past few years, people have come up with all sorts of tricks to be able to use these keys properly. We’ll be discussing a number of them below – ranging from quick fixes to total workarounds.

Solution One: Delete iTunes

WHAT? We told you we’d be seeing some pretty easy work-arounds. Well, this is about as quick as it gets. If you delete iTunes, you won’t be bothered by it launching in the future. Of course, this solution is only applicable for people who don’t use iTunesat all. If you ever want to reinstall iTunes, you can download iTunes from the Apple website for free.

+ Quick and easy+ Complete solution – no further hassle– You can’t use iTunes at all

Solution Two: Keep iTunes Or QuickTime Idle In The Background

WHAT? There are two other situations where iTunes doesn’t steal your focus. In the first scenario, iTunes is already open. In the second, QuickTime Player is. Basically, this solution will allow you to use the media function keys without interruption, but can be CPU intensive. For that reason, the QuickTime technique is preferred.

HOW? Open QuickTime, but no video. The application will run in the background and prevent iTunes from picking up the media key signals.

Alternatively, you can also use iTunes, but be sure to open the iTunes store before hiding or minimizing the application. That way, no songs will start playing spontaneously.

+ Quick and Easy– CPU intensive– Needs to be done continuously, and again after each startup

Solution Three: Disallow iTunes To Start By Media Keys

WHAT? There are basically two things we’re going to do. First, we’ll rename an essential file in the iTunes application package. That way, iTunes can’t start – not even when the media function keys try to. Second, we’re making an alternative executable that will launch the altered iTunes file.

HOW? Time to get our hands dirty. Open the Terminal application from Applications -> Utilities -> Terminal. Type the code below, or use copy-paste. Press enter after each line. You’ll be asked for your computer password after the second command.

Close the terminal and open AppleScript Editor, also via Applications -> Utilities. Copy-paste the code below.

tell application “Finder”

open document file “iTunesX” of folder “MacOS” of folder “Contents” of application file “iTunes.app” of folder “Applications” of startup disk

end tell

Select File -> Save As… and change the File Format to Application. Call it iTunesX and save it to your applications folder.

This executable will still be able to launch iTunes for you, and best of all, you can drag it to your dock. Alas, launching iTunes this way will also open a terminal window for the duration of the session.

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Daniel Richardson

May 25, 2010 at 11:07 pm

A much simpler way is to use some modifier keys when pressing the media buttons.For instance if you have Spotify open and press pause on your keyboard, iTunes will start up/start playing.However if you have 'Shift + alt' down when pressing play/pause, you won't get anything happening with iTunes.This is tested on Snow Leopard

A much simpler way is to use some modifier keys when pressing the media buttons.
For instance if you have Spotify open and press pause on your keyboard, iTunes will start up/start playing.
However if you have 'Shift + alt' down when pressing play/pause, you won't get anything happening with iTunes.
This is tested on Snow Leopard

Yes, except that you'd also have to start messing with the keyboard lighting, screen brightness, volume, etc. and that the media keys wouldn't work in a lot of other applications either. But if you only want to use them with, say, Spotify, it would indeed work flawlessly.

When I typed in the third terminal command, I kept getting a file not found error. I changed it to sudo chmod uog+x iTunesX instead of sudo chmod uog+x iTunes and it worked like a charm. If anyone sees any problem with this, let me know, otherwise it should work for anyone getting the same error. I'm very curious as to why MakeUseOf's method didn't work for me (assuming they tested this out themselves).

There seem to be a few people having trouble with that line, but it works for most people. If you also want to rid yourself of that command screen pop-up, try Ciaran's applescript, or the OS X application I posted above. Cheers.

I've also written an OS X application that'll solve this problem in a way similar to solution #3, but is a lot easier and cleaner to use. Here's a picture tutorial of how to use it.

12 MB [Broken Link Removed] Download from DropBox (mirror)

Completely free and virus-free. I wouldn't call myself a good programmer, though. If you want to improve upon this software solution, contact me via simon [at] makeuseof (dot) com or leave a comment below, and I'll send you what I already have. Cheers.

I've also written an OS X application that'll solve this problem in a way similar to solution #3, but is a lot easier and cleaner to use. Here's a picture tutorial of how to use it.

12 MB [Broken Link Removed] Download from DropBox (mirror)

Completely free and virus-free. I wouldn't call myself a good programmer, though. If you want to improve upon this software solution, contact me via simon [at] makeuseof (dot) com or leave a comment below, and I'll send you what I already have. Cheers.

I modified the applescript so that a terminal window doesn't open - it works by renaming the "iTunesX" file, opening it, then renaming it back to "iTunesX".

tell application "Finder"
try
set name of document file "iTunesX" of folder "MacOS" of folder "Contents" of application file "iTunes.app" of folder "Applications" of startup disk to "iTunes"
end try
tell application "iTunes" to activate
set name of document file "iTunes" of folder "MacOS" of folder "Contents" of application file "iTunes.app" of folder "Applications" of startup disk to "iTunesX"
end tell

When you run this script for the first time, it will rename the iTunes file to iTunesX, meaning that you do not have to go typing commands into terminal in the first place.

So no getting your hands dirty!

I think that also gets rid of the two negative points on the last method completely.