"Successful bindings survive other bindings' conflicts. No silent failure." — CwkKitMac's global hotkey registrar
Borrowed, Not Rebuilt
Tinker does not contain its own hotkey code. Flint, the family's text-transformation app, had already paid for system-wide chords — the Carbon RegisterEventHotKey door, the Cocoa-to-Carbon modifier translation, a recorder, a collision report — and that work was lifted into the shared Swift kit, CwkKitMac, as HotkeyChord and GlobalHotkeys. Tinker uses the same types and passes its own four-character signature, 'TINK', so its registrations can never be confused with another app's. When the kit's chord type gets a fix, every app that shares it gets the same fix.
A Chord Always Has a Modifier
HotkeyChord is a key plus a Carbon modifier mask, and its initialiser returns nil when the mask holds none of ⌘ ⇧ ⌥ ⌃. A "chord" with no modifier is just a keystroke, and registering one would steal that key from every app on the Mac. The type makes the mistake unrepresentable instead of relying on each caller to remember. It also decodes strictly: a stored key code the current build cannot name throws rather than decoding to something nameless.
Registration Reports Per Command
GlobalHotkeys.start takes every command that has a chord and tries each in turn. Two commands with the same chord: the second fails with "Duplicates first command's name". A chord macOS or another app already owns: "macOS or another app owns ⇧⌘E (…)." Every failure lands in a dictionary keyed by command ID, and every success stays registered regardless. Tinker shows each failure beside that command's recorder, and the menu adds a single "Hotkey conflicts — open Settings" line. A shortcut that silently does nothing is the one outcome the design will not accept. Internal hotkey IDs are never reused, so an event already queued for a removed binding cannot fire a newly registered one.
When Hotkeys Are Off
Tinker ships with no chord assigned to any command; Dad records his own. Registration is torn down and rebuilt whenever commands change, and it is skipped entirely in three states: while the recorder is listening (so pressing the chord you are trying to record does not run the command), while the engine is stopped, and while the engine could not be created. Emergency release stops hotkeys first.
Keeping Carbon Out of Observation
Tinker's app model is a Swift @Observable class, so SwiftUI re-renders when its properties change. The hotkey registrar holds Carbon references and is not a value the UI should track. It is declared @ObservationIgnored and created lazily; one early commit's whole purpose was to keep Carbon registration outside observation tracking. Only the resulting failure dictionary is observed, because that is what the screen shows.