"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. And the permission does not warn you: a suppressing tap is authorized by the same Accessibility grant you already hold for insertion, so that grant quietly becomes a seat in every keystroke. (A listen-only keyboard tap is the kind that needs Input Monitoring, a second prompt; a suppressing one needs nothing new, which is its own kind of danger.)
CGEventTap (rejected): flagsChanged + keyState (chosen):
sits in every keystroke observes modifier flag changes only
can suppress system-wide cannot swallow anyone's keys
same grant, far more power 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.