Assign Shortcut Keys to iTunes AppleScripts


Mac OS 10.3 introduced the ability to assign menu shortcut keys to pretty much every application, including iTunes. And including AppleScripts in iTunes' Scripts Menu. Here's how to do it.

(Hey! If you don't want to do-it-yourself, FastScripts from Red Sweater Software provides the ability to quickly and simply add and manage AppleScript keyboard shortcuts. I highly recommend it.)


Step 1: Set Up Your System Preferences

Note: This will only work with scripts that have been installed in your [username]/Library/iTunes/Scripts or [startupdisk]/Library/iTunes/Scripts folder.

Another Note: the instructions and screenshot below are for OS X 10.8, but vary only slightly (and obviously) under OS X 10.9.

Quit iTunes. You can't attach a keyboard shortcut to an application if it is running.

Open your System Preferences and click on "Keyboard" ("Keyboard & Mouse" for pre-Snow Leopard) in the Hardware row. Click on the "Keyboard Shortcuts" tab.

Click on the "+" button to add a new shortcut. In the Application pop-up of the window that appears, select iTunes. Beneath this pop-up in the Menu Title field enter the name of the AppleScript in iTunes Scripts Menu to which you want to assign a keyboard shortcut. Better write it down before you quit iTunes because spelling counts! In the Keyboard Shortcut field press the combination of keys you want to use for the shortcut.

setting shortcuts
Setting the shortcuts for the Pretend We Played This script in Snow Leopard's System Preferences (although it looks about the same thru Mavericks). The key combination I pressed is Shift-Command-X.

Close System Preferences.

The next time you start iTunes, look in its Scripts Menu. The shortcut you assigned will be displayed adjacent to the name of the Script you assigned it to, just like a real menu shortcut! That's because it is a real menu shortcut.

For more details, search your Mac Help for "Setting custom keyboard shortcuts for applications".

OF COURSE, you can also assign keyboard shortcuts for iTunes' menu commands that don't already have a shortcut, such as "Check for Purchases...", "Export...", "Check for Updates...", and so on.

If you assign a keyboard shortcut which iTunes is already using, you may get mixed results. For example, I assigned Shift-Command-N—which is iTunes' "New Playlist from Selection" shortcut—to a script and the script fired (the script actually does the same thing as "New Playlist from Selection" but asks for a new playlist name first). But it wouldn't let me assign Command-A, the universal "Select All" shortcut. It also knows what keys you have assigned already, and it will warn you if you try to enter a duplicate shortcut.

As far as using the F keys: I could only get combinations that included Command to work. No problem, though. There are still hundreds of key combinations available.

Sometimes I had to quit and re-start iTunes a second time before the shortcut "took". Maybe that's just my system.

Check out the Missing Menu Commands page for some mini-scripts that work great with shortcuts.

Here are some suggested scripts to which you may want to assign a shortcut:

Site contents © 2001 - 2015 (that's right: 2001) Doug Adams and weblished by Doug Adams, dougscripts AT mac DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc with whom this site has no affiliation.