I have always liked my play/pause button to always affect my iTunes music and never any other application.

Since before macOS High Sierra, the media keys on the function bar always used to control iTunes. This was great as it allowed me to have full control over my music. that is, play music; find a YouTube video, pause music, start YouTube video. That YouTube video would then end then I would be able to play my music again.

Now since High Sierra, that doesn't happen. If I have a YouTube video up, it controls that instead of my music. This means that I have to open up iTunes, then click the play button and go back to Safari. I fixed this by using BetterTouchTool to reprogram the function buttons to bring back the pre High Sierra functionality.

Today, with the TouchBar, I am back with the same issue. Yes, I can use BetterTouchTool but now that requires two clicks. One to activate the BTT controller strips and another to press the play/pause button.

Is it posible to have a global button in the TouchBar controls strip that controls iTunes only?

  • @JBallin That is for the function keys. This is for the touch bar so it’s a different method.
    – iProgram
    Commented Jul 27, 2018 at 21:01
  • I’m using touchbar as well (I’m OP). AFAIK play button functions the same way.
    – JBallin
    Commented Jul 27, 2018 at 21:07
  • @JBallin But what I want to do is to add it globally in the left hand corner not in the function keys or the expanded control strip. Just the one in the corner.
    – iProgram
    Commented Jul 27, 2018 at 21:09
  • IMO we're both looking for an easy way to play/pause iTunes without affecting other media. My question doesn't specify a specific solution.
    – JBallin
    Commented Jul 27, 2018 at 21:16
  • Simplified my answer: apple.stackexchange.com/a/300882/151404
    – JBallin
    Commented Jul 27, 2018 at 21:22

1 Answer 1


I am 5 reputation short of being able to make this a comment, but I think it's enough of a solution that I can post it as an answer.

I do not have better touch tool or a menu bar (I do have keyboard maestro and I know you could probably do it using that).

However, what you can do is either script the menu item or send a keystroke to iTunes using applescript. You can then run it out of automator (and assign it a keyboard shortcut) or BTT or somehow just activate it using your touch bar.

According to this reddit post (https://www.reddit.com/r/apple/comments/8okzvg/macos_mojava_supports_automator_workflows_on_the/) mojava will add automators to the touch bar.

enter image description here

Either way, here's a script:

tell application "System Events"
    tell application "iTunes" to activate
    key code 49
    set visible of process "iTunes" to false
end tell

It's not perfect, but it gets the job done.

Not the answer you're looking for? Browse other questions tagged .