What It Does

On a Mac, commandF1 toggles display mirroring. It sits right next to combinations you reach for constantly, so it’s easy to trigger by accident — and an unexpected mirror flip is disruptive, especially mid-presentation or mid-task.

MirrorGuard installs a global event tap at the HID level — before macOS acts on the shortcut — and discards the commandF1 keystroke. The mirroring toggle simply never fires.

How It Works

You PressWhat Happens
commandF1Nothing (consumed silently — no mirroring)
F1 aloneNormal brightness-down, untouched
Any other keyUntouched

The command requirement is deliberate: MirrorGuard only intercepts F1 when command is held, so ordinary brightness control keeps working exactly as before. It matches both key-code forms of F1 — brightness-down in media-key mode, or the plain function key in standard-function-key mode — so it works regardless of your “Use F1, F2 as standard function keys” setting.

Settings

Click the display icon in the menu bar and choose Settings… to configure:

Display Mirroring

General

If you’ve hidden the status icon and want it back, just re-open MirrorGuard from your Applications folder — it reappears immediately.

Auto-updates are handled by Sparkle. Use the “Check for Updates…” menu item to check on demand; MirrorGuard also checks for new versions automatically once a day in the background.

Permissions

Permission status can be checked in Settings. MirrorGuard makes no persistent system changes — there is no key remapping, and removing the app removes the guard entirely.

Installation

Two formats on every release — both signed and notarised, pick whichever suits:

On first launch, grant Accessibility permission when prompted.

Building from Source

MirrorGuard uses Swift Package Manager. No Xcode project is required.

  1. Clone the repo: git clone https://github.com/PerpetualBeta/MirrorGuard.git
  2. Run gmake build
  3. Launch with open .build/MirrorGuard.app

Requirements

macOS 14 (Sonoma) or later. Universal binary (Apple Silicon and Intel).