Mac Field Guide

Sound and AirPodsFix

Play/pause key opens Apple Music instead of Spotify? Make media keys control the right app

Applies to macOS 15, 26 and 27Reviewed 20 November 20262 min read

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
  1. How the Mac decides which app gets the key
  2. Fix 1: give Spotify Now Playing
  3. Fix 2: stop browsers taking over the keys
  4. Fix 3: stop Apple Music opening
  5. Last resort: turn off media key handling
  6. Volume keys change the wrong device
  7. Other apps that can help
  8. Sources and further reading

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

  1. Open Spotify (or your player) and press play with the mouse once.
  2. From now on the keys control it, until another app plays something.
  3. 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.

AppWhat it doesPrice
Music DecoyStops the play key and headphones from opening Apple Music when nothing is playingFree, open source
Karabiner-ElementsRemap media keys to anything, per appFree, open source

Sources and further reading

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.

    Add a tip

    No links or email addresses. Tips are checked before they show. How we handle tips

    Keep reading