Skip to content

[BUG] Deleted modifier-only primary shortcut remains active until app restart #498

Description

@arthurlee116

Describe the bug

A deleted modifier-only Primary Dictation shortcut can continue activating FluidVoice until the app is restarted.

This looks like a remaining variant of #470, but with modifier-only shortcuts. The persisted settings no longer include the deleted shortcut, yet the old physical modifier key can still trigger dictation in the running app.

What happened

  1. Primary Dictation Shortcut was set to Left Option.
  2. Left Command was accidentally recorded as an additional Primary Dictation Shortcut.
  3. Left Command was then deleted from FluidVoice settings.
  4. After deletion, pressing Left Command still activated FluidVoice.
  5. Restarting/quitting FluidVoice cleared the stale behavior.

Local evidence

After deleting Left Command, FluidVoice preferences only showed Left Option (keyCode: 58):

HotkeyShortcutKey: {"kind":"keyboard","keyCode":58,"modifierKeyCodes":[58],"modifierFlagsRawValue":0}
PrimaryDictationShortcuts: [{"kind":"keyboard","keyCode":58,"modifierKeyCodes":[58],"modifierFlagsRawValue":0}]

A separate CGEvent listener confirmed the physical Left Command key reports keyCode=55, not 58. So the deleted Left Command shortcut was no longer present in persisted preferences, but it was still active in the running hotkey manager.

Expected behavior

After deleting a Primary Dictation shortcut, the deleted modifier-only shortcut should stop triggering immediately, without requiring an app restart.

Actual behavior

The deleted modifier-only shortcut can remain active until FluidVoice is restarted.

Environment

  • FluidVoice: 1.6.1
  • macOS: Tahoe 26.x
  • Keyboard event codes involved:
    • Left Command: 55
    • Left Option: 58
    • Right Option: 61

Possible source area

GlobalHotkeyManager.updatePrimaryShortcuts(_:) appears to only assign the new shortcut array:

func updatePrimaryShortcuts(_ newShortcuts: [HotkeyShortcut]) {
    self.primaryShortcuts = newShortcuts
    DebugLogger.shared.info("Updated transcription hotkeys", source: "GlobalHotkeyManager")
}

For modifier-only shortcuts, it may also need to clear modifier-only/active press state or reinitialize the tap when the shortcut set changes.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions