If I am playing music on my Mac (which is basically always when I am working on my Mac and not in meetings) and I need to play a video somewhere else (say Youtube), I click the play button in the browser and video starts to play. So I then click Play / Pause on keyboard. What I would like to happen at this time is the music pauses. Unfortunately, it pauses the YouTube video (or whatever video is playing). That is never what I want to happen.
I searched and didn’t see if this was answered already (sorry if I missed it) but is there a way to make sure play pause on keyboard ONLY ever controls music?
I also don’t like that if I am in keynote working on a presentation and it takes over the play pause keyboard keys too. I only ever want those keys to control the music app. Anyone know how to do that?
There used to be tiny apps for this like High Sierra Media Key Enabler, Mac Media Key Forwarder, and BeardedSpice but I don’t know any that work on my M1 MacBook Air.
There was also a Karabiner Elements rule that I could not get to work.
So I wrote a simple AppleScript to play/pause Music that I added to FastScripts and trigger via a hotkey combo. I’m sure it could be triggered by other utilities as well.
This doesn’t directly solve your problem in the way you would like it to, so I apologize and I understand your frustration.
What I’ve done to alleviate the problem is run Alfred and Powerpack (Alfred’s paid version). That gives me the ability to hot-key the Music app to Control + Command + Return. That’ll give me the UI in the screenshot below.
At that point, I just start typing “pause” until Alfred lets me pause the music with a quick keystroke.
Obviously, this is way more steps than just hitting the Play/Pause button. 150% agreed, and I would prefer it to work your way. But this at least makes it so I don’t need to take my hands off the keyboard for this mundane task.
Yeah, that’s frustrating and I’ll be interested to see if you find a good solution.
I have the same issue, but the reverse of you. I listen to music in Plex in a browser tab all day. Sometimes, I think when it’s been paused for a long time?, I’ll hit the play button on my keyboard and instead of resuming the music in plex it will open the Music app and start playing something randomly from there. Pretty frustrating.
They just played two places close to me, although I did not go. And while I wouldn’t have them as the top item on my list as snelly does, (Pink Floyd and Brian Eno would be at the top) there is some of their stuff I enjoy. One of the few bands that Apple Music suggested that clicked with me.
I think this is something that must be embedded in Apple OS, because I run a mechanical keyboard that’s coded via QMK and even though my play/pause button is specifically scripted to play/pause music, if I put a video on the button automatically controls that too, even though it’s not coded to do so (by me at least!). It is frustrating.
What bugs me though is that if you’re on an iOS device, iOS automatically pauses and then resumes your music while you watch a video, so clearly Apple are aware we don’t like music playing while we watch a video, but hasn’t made this easy on MacOS
Now if only someone could come up with a way to keep the Mac Music app (rewritten as a Catalyst app on the Mac) to keep playing. It often seems to lose its place, doesn’t correctly show the currently playing song, and then just stops playing partway through a playlist.
I use a combination of Keyboard Maestro and Karabiner Elements to do this.
Keyboard Maestro has 3 macros running simple AppleScripts telling Apple Music to Previous Track / Play-Pause / Next Track, set to F18, F19, F20 respectively. E.g.
That’s it. It works very well, particularly as I don’t use the function keys to watch videos – there’s no need when YouTube has built in shortcuts anyway.