- USB Overdrive
- A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4
- Plug in your keyboard and install USB Overdrive.
- Open USB Overdrive. Click into the Settings tab.
- Click the dropdown and select "Any Keyboard, Any Application"
- Click the "Scan Next Track" item in the left-hand list. You can also select this key by focusing the USB Overdrive window and pressing the actual key on the keyboard.
- In the right-hand column click the dropdown and select "Execute AppleScript".
- Paste the following AppleScript:
tell application "Spotify" next track end tell
- Repeat steps 4 and 5 but select "Scan Previous Track". Paste the following AppleScript:
tell application "Spotify" previous track end tell
- Repeat steps 4 and 5 but select "Play/Pause". Paste the following AppleScript:
tell application "Spotify" playpause end tell
FYI, there has been a bug in Spotify 1.0.1.x that breaks Applescript functionality. You'll need to edit a
plist
file in order to get it working again. Details here: https://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/New-Mac-Update-AppleScript-support-removed/m-p/1044011#M112587I also had to logout/restart before USB Overdrive/Spotify accepted the modified
plist
fix.