The Media Key Hijacking
Modern PC keyboards feature dedicated physical buttons for Play, Pause, Next Track, and Volume. Historically, pressing the Play button would universally trigger your dedicated music player (like Spotify or iTunes). However, Google Chrome includes a feature called “Hardware Media Key Handling” which intentionally hijacks these global keyboard inputs. If you have a YouTube video paused in a random background tab and you press the physical Play button on your keyboard hoping to start your Spotify playlist, Chrome will intercept the command and loudly start playing the YouTube video instead. If you want your keyboard buttons to strictly control your desktop music player, you must force Chrome to ignore them.
How to Turn Off Media Key Handling
You cannot change this behavior in the standard settings menu; you must disable the underlying Chrome flag.
- Open the Google Chrome desktop browser.
- Click inside the main address bar, type exactly
chrome://flags, and press Enter. - At the top of the Experiments page, you will see a search box. Type Hardware Media Key Handling.
- The specific flag will appear highlighted in yellow.
- Click the dropdown menu next to it (it likely says “Default”) and change it to Disabled.
- A large blue Relaunch button will appear at the bottom of the screen. Click it to restart the browser.
Restoring Audio Control
When Chrome reopens, the browser is permanently disconnected from your physical keyboard shortcuts. You can now leave dozens of YouTube tabs and Twitch streams open in the background; pressing the Play/Pause button on your keyboard will bypass Chrome entirely, sending the command directly to Spotify or your system audio player exactly as you intended.