"A suppressing event tap is a tollbooth on every keystroke the machine makes. Be very sure you want that job."
The Requirement
Firekeeper's default activation is a bare Fn hold — no chord, just hold the key you never use and talk. That's a lovely interaction and a genuinely awkward thing to implement, because a bare modifier isn't a normal hotkey. There's no "Fn pressed" event in the ordinary shortcut APIs; modifiers announce themselves through flag changes, and you have to reconstruct press-and-hold from that.
The Tempting Wrong Tool
The obvious answer is a CGEventTap: sit in the system-wide event stream, watch every key, and swallow the ones you claim. It works — and it makes your app a tollbooth on every keystroke the machine produces. If your tap misbehaves, you don't break your app; you break typing, everywhere. That's not hypothetical: a competitor's suppressing tap is exactly what ate users' spacebars. On top of the risk, a tap needs Input Monitoring permission — a second scary prompt on top of the Accessibility grant you already need for insertion.
CGEventTap (rejected): flagsChanged + keyState (chosen):
sits in every keystroke observes modifier flag changes only
can suppress system-wide cannot swallow anyone's keys
needs Input Monitoring rides the Accessibility trust we already have
competitor's ate spacebars can't eat what it doesn't intercept
The Chosen Path
Firekeeper watches NSEvent flagsChanged monitors instead, and uses CGEventSource.keyState to disambiguate the cases flags alone can't — most notably telling a press from a release when the twin modifier (the other Command key, say) is still held down. It works with the Accessibility trust the app already holds for insertion, adds no new permission surface, and structurally cannot swallow a keystroke, because it never intercepts the stream in the first place. Same interaction, a fraction of the blast radius.