btrcd (BlueTooth Remote Control Daemon) is a simple app that receives button events from bluetooth headsets and converts them to equivalent keyboard events. It is made possible because of the MPRemoteCommandCenter part of the MediaPlayer framework.
I use it to control Google Play Music from my bluetooth headphones but it theory it should work equally well for Spotify, etc.
The app has no UI. It's only an app because otherwise it doesn't receive next/previous events for some reason.
Only tested on 10.12.3. It almost certainly only works on 10.12.2+ as that's when MPRemoteCommandCenter was introduced.
- Download the latest zip from the releases page.
- Extract the zip and place the app somewhere (/Applications isn't a bad choice)
- Launch the app. Nothing will appear to happen.
- Test your head-{phones,set}.
If you want the app to launch when you start your computer add it to your "Login Items" in System Preferences > Users & Groups.
- Delete the app from wherever you installed it.
Icon was created by Thierry Teyssier and listed on SketchAppSources