Skip to content

Instantly share code, notes, and snippets.

@plmcgrn
Last active March 10, 2024 22:59
Show Gist options
  • Save plmcgrn/5d908e576821b3e0a9e5d0c707316087 to your computer and use it in GitHub Desktop.
Save plmcgrn/5d908e576821b3e0a9e5d0c707316087 to your computer and use it in GitHub Desktop.
Setting favorite/suggest less keyboard shortcuts in Apple Music for Mac

Setting favorite/suggest less keyboard shortcuts in Apple Music for Mac

Apple seems to have dropped the ball on binding these fairly important actions to native shortcut keys while also supplying them for a mountain of things most people don't carte about. This gist will show you how to correct that.

Tested on Apple Music 1.4.2.83 on MacOS Sonoma 14.2.1

What you'll need

  • Automator
  • System Settings

Suggest Less and Next Track

Steps to create (click to expand) This one sets `Suggest Less` for whatever is currently playing and then skips to the next track.
  • Open Automator and create a new Quick Action
  • Drag a "Run AppleScript" into the editor
  • Use this script
on run {input, parameters}
	tell application "Music"
		set favorited of current track to false
		set disliked of current track to true
		next track
	end tell
	return input
end run
  • Save the Quick Action
image

Favorite current track in the background

Steps to create (click to expand) This one simply favorites the current playing track.
  • Open Automator and create a new Quick Action
  • Drag a "Run AppleScript" into the editor
  • Use this script
on run {input, parameters}
	tell application "Music"
		set favorited of current track to true
	end tell
	return input
end run
  • Save the Quick Action.
image

Create keyboard shortcuts

Steps to create (click to expand) The last part of this is binding your new Quick Actions to shortcut keys. * Open `System Settings` * Go to `Keyboard`, then `Keyboard Shortcuts` * In `Services` > `General`, you'll see your new services * Simply click in to each one and set a desired shortcut.

I like using Control + + + Up / Down arrow, to give it guaranteed uniqueness from other apps but also easy to just jam all 3 of those down with one hand and hit the arrow key with the other.

image

Notes

  • These Quick Actions run as a global shortcuts, so you don't need the mouse to favorite a song or even to look at the app to do so.
  • By default, Automator Quick Actions save to ~/Library/Services, if you need to go back and make edits later.
  • The first time you run each one, MacOS will ask if you want to allow whatever app you're using to control Music. YOu need to click Allow on this, just the first time. If anyone knows how to bypass this, please add a comment here.
  • Sometimes Music may not display the change when doing these in the background, but you can manually find that track to confirm whether it worked. I have seen some tests where it failed ot show immediately in the Music app (star in the playing section or Undo Suggest Less when right clicking) but when checking, the actions did take effect in the background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment