Skip to content

qns7/mkff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mkff — Media Key Forwarder for foobar2000

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)

Download

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.appOpenOpen 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.

Requirements

  • macOS 14 Sonoma or later
  • foobar2000 for Mac
  • foobar2000 must have its hotkeys configured to:
    • Ctrl+Shift+Opt+Cmd+F7 → Previous track
    • Ctrl+Shift+Opt+Cmd+F8 → Play/Pause
    • Ctrl+Shift+Opt+Cmd+F9 → Next track

Menu bar

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

How it works

Modern macOS routes media keys through two separate pathways:

  1. NX_SYSDEFINED events — the classic keyboard media key path. mkff sits at the lowest tap point (cghidEventTap) and consumes every event before any other app sees it.
  2. mediaremoted daemon — used by Safari, browsers, and headphone controls. This bypasses the event tap entirely. mkff registers with MPRemoteCommandCenter and uses a private MediaRemote.framework call (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.

Building from source

git clone https://github.com/qns7/mkff.git
cd mkff
xcodebuild -project mediakeyforwardfoobar.xcodeproj \
           -scheme mediakeyforwardfoobar \
           -configuration Release \
           -derivedDataPath build

The app ends up at build/Build/Products/Release/mediakeyforwardfoobar.app.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages