

This says: when the button pressed is play_or_pause then run an applescript and prevent the keyup. Under the directory complex_modifications (make it if it doesn't exist), add this file as touchbar.json (or as you please): This is where we'll add the following in new JSON file. Controlling Spotifyįrom Karabiner Elements' preferences, on the Misc tab, click on the button the reads "Open config folder". Now test the play control strip button - if it mutes, then it's working and the next step is to create a "complex modification" to control Spotify (you should remove the simple modification now). Now Karabiner can see your keyboard - and a quick way to test this is to head to "Simple Modifications" and add "play_or_pause" and map it to (something like) "mute". Once you've got that running, it needs to see the touch bar - which apparently announces itself as an entirely separate keyboard.
#Keyboard playback for spotify on mac install#
Step one is to download and install Karabiner Elements. It's not quite that simple, but it's no too far off. So it stands to reason that I could capture the play/pause key press and completely take it over and send it to Spotify instead. It gives you complete control over the keyboard and sits in between and gives you the ability to completely change what the operating system actually sees.

I've been using Karabiner Elements for a while now and it's a superb bit of software.

That said, it absolutely does my head in that the control strip's "play/pause" button will only control iTunes/Music. It's cute, but I know that my laptop will be closed for 90% of the time and attach to an external monitor and keyboard. I've recently upgraded my laptop (after the 6 years my previous MacBookPro latest) and I've now got one of these touchbar things.
