Fixes the actual root cause behind the "hotkey doesn't work" reports: the
capture UI itself could persist a corrupted shortcut.
Fixed
- Rebinding the hotkey to an Option/Alt combo could silently corrupt it.
Live log evidence:Global shortcut registration failed ... error=Found empty token while parsing hotkey: Alt+\u{a0}. The General pane's capture
UI built the accelerator fromKeyboardEvent.key— the composed
character — but macOS recomposes many keys under Option into a different
Unicode character than what's printed on the keycap: Option+Space'skey
is a non-breaking space (U+00A0), not a plain" ", and Option+letters
compose accented characters (Option+C → "ç"). The capture UI showed
"Alt+Space" (the display used the physical key label) but silently
persisted"Alt+<NBSP>"(built from the composed character) to
settings.json— invisible until the next boot's registration attempt
rejected it outright. The 0.1.15/0.1.16 self-heal recovered the hotkey
back to the default afterward, but the underlying capture bug meant
rebinding to any Option combo reproduced it every time.
toAcceleratornow resolves letters/digits/Space from
KeyboardEvent.code(the physical key, unaffected by modifier
composition) instead ofkey. Verified live: simulated the exact
Option+Space event macOS actually sends (code: "Space", key: "\u00A0")
and confirmed it now captures asAlt+Space; same for Option+C
(key: "ç") capturing asAlt+C.