Skip to Content
macos-media-keys

πŸ‘‹ Introduction

A tiny Node library that posts macOS system media keys to whichever app is playing.

@kud/macos-media-keys exposes one async function, sendMediaKey, that fires the same system events as the media keys on a Mac keyboard. Whatever app currently owns media focus (Music, Spotify, Qobuz, a browser tab) reacts as if you had pressed the physical key.

For a ready-made command line, see macos-media-keys-cli.

What's here

On this page