dougscripts.com

Assign Shortcut Keys to Scripts Menu AppleScripts

setting shortcuts

The macOS has the ability to assign menu shortcut keys in pretty much every application, including AppleScripts listed in the Scripts Menu of the Music app. 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.)

 

Set Up Your System Settings

Note: This will only work with scripts that have been installed in the Music app's "Scripts" folder such that a script's name appears in the Music app's Scripts menu. Installation instructions are included in a script's disk image download or see the online FAQ.

Open your System Settings and click on "Keyboard" in the left column. Click on the "Keyboard Shortcuts..." button in the panel that appears. A new panel will open with a list of options on its left side. Click "App Shortcuts"

setting shortcuts

Press the "+" button to add a new shortcut. Another panel appears:

setting shortcuts

In the "Application" field, click the double-arrow widget on the right and choose "Music" from the popup list of applications.

For the "Menu title", enter the name of the AppleScript to which you want to assign a keyboard shortcut exactly as it appears in the Scripts menu. (You can use System Setting's Edit > Paste menu command to copy text from the clipboard to this field, but you can't paste it by Command-V because "⌘V" would be entered as the keyboard shortcut; otherwise, you have to type text in this field.)

Then, in the "Keyboard shortcut" field, simultaneously press the combination of keys you want to use for the shortcut.

setting shortcuts

Click the "Done" button(s). You can create additional shortcuts or quit System Settings.

(Possible issue In recent versions of macOS, there may be a bug. The only way I could get menu items in Music to be recognized was to 1) Leave the "Application" pop up set to "All Applications" rather than choosing "Music" and 2) entering the full "menu path" to the particular item. For example, "Scripts->Albumize Selection" or "Scripts->Search Wikipedia". I do not have this issue in macOS 27.)

The shortcut you assigned will be displayed adjacent to the name of the menu item 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, this isn't just for assigning shortcuts to items in the Scripts menu. You can also assign keyboard shortcuts for menu commands that don't already have a shortcut. For example, as I frequently recommend, you can assign shortcuts to "as Playlist" and "as Songs" in the "View" menu. This will improve the quality of your life in a way you cannot imagine:

setting shortcuts

Frankly, if you regularly use a shortcut-deprived menu command in any app then you're nuts if you don't assign a keyboard shortcut to it instead of traveling to the menu bar every time you want to hit it. For particular projects, I may even assign a keyboard shortcut to a script temporarily just so I don't have to keep mousing all over the place for the duration of the project.

Bear in mind that if you assign a keyboard shortcut which an app is already using you may get mixed results. For example, I assigned Shift-Command-N—which is used by Music for "New Playlist from Selection"—to a script and it launched just fine, somehow over-riding the menu command. But it wouldn't let me assign Command-A, the universal "Select All" shortcut.

Site contents © 2001 - 2026 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.