Skip to content

fix: remove dead rollback branch in applyGlobalHotKey() (M2) #48

Description

@sfegette

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions