
Then installing skhd (amazing shortcut manager for OSX): brew install koekeishiya/formulae/skhd No need to worry about Spotify API if prompted - that is optional if you want to be able to choose tracks from the command line play/pause, and volume settings work out of the box. To install shpotify (command line interface for Spotify): brew install shpotify (then continue from the list above by installing Fastscripts.)
Select Function keys and map f7>f7, f8>f8, f9>f9. In that case, skip the first 4 steps in the above list and instead: And finally in In FastScripts, go to "Script Shortcuts" and set F7, F8, and F9 as shortcuts for your scripts!ĮDIT: Karabiner does not yet work with Sierra, but a pre-release called "Karabiner Elements" does the trick. Enter and save the following three apple scripts (for Spotify, but I'm sure this works with some other media players to) to the folder /Library/Scripts:. Add the "run apple script" action to the main screen. Change "service receives selected:" to. Open Automator and create a new Service. Enable all but "F7, F8, F9 to music Controls" (unless you'd like to map any other keys to features of your choice) (now the brightness etc. Choose "Change F1.F19 Key & Function key." > "Change F1.F19 Key" > "F1.F12 to Functional Key". (this will disable all quick controls like brightness, and volume) Go to system preferences > Keyboard > and select "Use all F1, F2, etc keys as standard function keys". When working in Keynote or another application that "claims" the media keys, controlling Spotify (or other music players) won't work.īinding Media keys to one Media player, and that player only:
I'v had this problem for years and in my case it goes beyond iTunes. Homebrew: brew install -cask macmediakeyforwarder It can be downloaded and installed directly from GitHub, or by using e.g. MacOS High Sierra, Mojave, Catalina, or Big Sur so it remains an alternative. Nevertheless, Mac Media Key Forwarder will still work fine for most people running on e.g. Update - Use Beardedspice as the alternative app Mac Media Key Forwarder is no longer being updatedĪs there are reports of Mac Media Key Forwarder not working for some users, and the developer no longer updating the app, it is recommended to use Beardedspice.
I am not affiliated with the developer(s), I am just a satisfied user. Simply disable any unwanted players, while keeping Spotify enabled. Beardedspice supports controlling a vast amount of media players. Ensure the application is given sufficient privileges in Security & Privacy in the System Preferences.
Homebrew: brew install -cask beardedspice It can be downloaded and installed directly from the Beardedspice homepage, or by using e.g. It runs in the background and gives you a few simple settings in the Mac menu bar. The software Beardedspice provides a user-friendly approach to prioritizing Spotify for your media keys.