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 Press | What Happens |
|---|---|
| commandF1 | Nothing (consumed silently — no mirroring) |
| F1 alone | Normal brightness-down, untouched |
| Any other key | Untouched |
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
- Block ⌘F1 mirroring shortcut — turn the guard on or off. The menu bar icon shows a slash through the displays while the guard is active.
General
- Accessibility permission — status display and grant button
- Show icon in menu bar — hide the status icon while MirrorGuard keeps running in the background. Your choice persists across launches, including login auto-start. Shown only on macOS 14–15; on macOS 26 (Tahoe) and later, use System Settings → Menu Bar, which provides this natively.
- Menu bar icon pill — optional grey background for stronger contrast on busy or wallpaper-tinted menu bars (off by default)
- Launch at Login — start automatically when you log in
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
- Accessibility — required to intercept the keyboard shortcut before macOS acts on it. macOS will prompt on first launch.
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:
- Installer (
.pkg) — recommended for first-time installs. Double-click to run; macOS Installer places the app in/Applicationswithout quarantine or App Translocation. - Download (
.zip) — unzip and dragMirrorGuard.appto your Applications folder.
On first launch, grant Accessibility permission when prompted.
Building from Source
MirrorGuard uses Swift Package Manager. No Xcode project is required.
- Clone the repo:
git clone https://github.com/PerpetualBeta/MirrorGuard.git - Run
gmake build - Launch with
open .build/MirrorGuard.app
Requirements
macOS 14 (Sonoma) or later. Universal binary (Apple Silicon and Intel).