Play/pause key opens Apple Music instead of Spotify? Make media keys control the right app
SpotifyApple MusicYouTubeAirPodsKeyboard
Short answer
The play/pause key controls whichever app last played audio, shown as Now Playing in Control Center. When no app has played anything since you logged in, macOS opens Apple Music. Press play once inside Spotify (or your player) after you start the Mac, and the keys follow it from then on. To stop Apple Music opening at all, use the free Music Decoy app.
On this page
How the Mac decides which app gets the key
- The play/pause key (F8), the next/previous keys, the AirPods stem or double-tap, and the buttons on Bluetooth headphones all go to the app in Now Playing.
- Now Playing is the app that most recently played or paused audio. That includes browsers: a YouTube or Netflix tab, or a muted video ad, can take it over.
- If nothing is in Now Playing, macOS starts Apple Music.
Open Control Center and look at the Now Playing tile to see which app the keys will control right now. Click it to switch to the app.
Fix 1: give Spotify Now Playing
- Open Spotify (or your player) and press play with the mouse once.
- From now on the keys control it, until another app plays something.
- To start your player with the Mac, add it in System Settings › General › Login Items (more in apps opening at login).
Fix 2: stop browsers taking over the keys
- Close or pause the tab that took over. Pausing a video in its own player is enough for Now Playing to move on.
- In Chrome, Edge and Brave, a tab with audio also shows a media button in the toolbar. Click it to see which tab is holding the media keys and pause or stop it there.
- Turn off autoplay on sites that start videos by themselves (YouTube has an autoplay switch on the player).
Fix 3: stop Apple Music opening
Music Decoy is a small free app that runs in the background and makes macOS believe Music is already open, so the play key and your headphones no longer launch it. Your other player keeps working. The catch: you can't use the Apple Music app while Music Decoy is running.
Last resort: turn off media key handling
macOS sends media keys through a background service called rcd. Turning it off stops Apple Music launching, but it also stops all media keys and headphone buttons from controlling any app. Only do this if you never use the keys.
launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist
To undo it:
launchctl load -w /System/Library/LaunchAgents/com.apple.rcd.plist
On recent macOS versions this command can fail with "Could not find specified service" or be undone by an update. Music Decoy is the safer route.
Volume keys change the wrong device
The volume keys always change the current output device, not a single app. If they do nothing, the output is probably an HDMI or DisplayPort monitor, which macOS can't control the volume of. Pick another output in System Settings › Sound › Output, or use the monitor's own buttons. To set different volumes for different apps, see per-app volume.
Other apps that can help
You don’t need any of these for the steps above. They go further in different ways, so pick what fits how you work.
| App | What it does | Price |
|---|---|---|
| Music Decoy | Stops the play key and headphones from opening Apple Music when nothing is playing | Free, open source |
| Karabiner-Elements | Remap media keys to anything, per app | Free, open source |
Sources and further reading
- Stop the Apple Music app from launching automatically · DEV Community
- Play button only works on Apple Music (Catalina) · Spotify Community
Applies tomacOS 27TahoeSequoia
Reader tips
No tips yet. If something else worked for you, or a step looks different on your Mac, add it here.