The play, next and previous keys on a Mac always end up in Music.app. This makes them control Spotify instead.
Works on macOS 13 and newer, on Apple Silicon and Intel. Spotify has to be installed.
Paste this into Terminal:
curl -fsSL https://raw.githubusercontent.com/Roccccky/mediakeyjack/main/install.sh | bashA settings window opens. Switch on MediaKeyJack under Accessibility. That's it.
curl -fsSL https://raw.githubusercontent.com/Roccccky/mediakeyjack/main/uninstall.sh | bashNo network connections, no telemetry, no account, nothing sent anywhere. The only
file it writes is ~/Library/Logs/MediaKeyJack.log.
macOS asks for Accessibility permission, which sounds like it can read everything
you type. It can't. The event tap listens to NX_SYSDEFINED and nothing else,
which is the media buttons and no other key.
MediaKeyJack.swift is the whole program. ./build.sh compiles it.
MIT, see LICENSE.