A minimal macOS menu bar app that routes all media keys exclusively to foobar2000.
- foobar2000 is running → play/pause, next, previous always go to foobar, even if Safari or another browser is actively playing audio
- foobar2000 is not running → media keys do nothing (no accidental Apple Music launch)
Grab mkff.zip from the latest release, unzip it, and drag mkff.app to your Applications folder.
First launch: macOS will warn that the app is from an unidentified developer because it isn't notarized. Right-click
mkff.app→ Open → Open to get past it. You only need to do this once.
After that, grant Accessibility permission when prompted — mkff needs it to intercept media keys.
- macOS 14 Sonoma or later
- foobar2000 for Mac
- foobar2000 must have its hotkeys configured to:
Ctrl+Shift+Opt+Cmd+F7→ Previous trackCtrl+Shift+Opt+Cmd+F8→ Play/PauseCtrl+Shift+Opt+Cmd+F9→ Next track
Click the mkff icon to:
- See whether foobar2000 is currently running
- Pause — temporarily suspend forwarding (media keys pass through normally)
- Open at login — start mkff automatically on every boot
- Hide from menu bar — removes the icon; reopen via the dock or re-adding the login item
Modern macOS routes media keys through two separate pathways:
NX_SYSDEFINEDevents — the classic keyboard media key path. mkff sits at the lowest tap point (cghidEventTap) and consumes every event before any other app sees it.mediaremoteddaemon — used by Safari, browsers, and headphone controls. This bypasses the event tap entirely. mkff registers withMPRemoteCommandCenterand uses a privateMediaRemote.frameworkcall (MRMediaRemoteSetNowPlayingApplicationOverrideEnabled) to hold the Now Playing slot exclusively, even against apps producing real audio output.
The result is that foobar2000 receives all media key commands regardless of what else is playing.
git clone https://github.com/qns7/mkff.git
cd mkff
xcodebuild -project mediakeyforwardfoobar.xcodeproj \
-scheme mediakeyforwardfoobar \
-configuration Release \
-derivedDataPath buildThe app ends up at build/Build/Products/Release/mediakeyforwardfoobar.app.
MIT