Summary
In AppDelegate.applyGlobalHotKey(), the catch block contains:
if currentHotKey != previousHotKey { ... }
This condition is never true because activateGlobalHotKey only mutates currentHotKey after a successful registration. The "grapfel lost its global shortcut" message path is unreachable.
Fix
- Remove the dead
if branch
- Add a short comment in the catch block explaining the invariant: the old hotkey remains active on failure because
currentHotKey is only updated on success
Notes
Low-risk cleanup — behavior is correct, this is just dead code removal.
Summary
In
AppDelegate.applyGlobalHotKey(), the catch block contains:This condition is never true because
activateGlobalHotKeyonly mutatescurrentHotKeyafter a successful registration. The "grapfel lost its global shortcut" message path is unreachable.Fix
ifbranchcurrentHotKeyis only updated on successNotes
Low-risk cleanup — behavior is correct, this is just dead code removal.