Skip to content

[FEATURE] Global hotkey does not trigger when sent as a synthetic key event (e.g. from SteerMouse, likely BetterTouchTool/Keyboard Maestro too) #622

Description

@dederem

Problem

Summary

The global dictation hotkey (configured to Cmd+Shift+J) does not trigger when the key combination is sent as a synthetic keyboard event by a third-party mouse/macro utility (tested with SteerMouse). It works correctly when the same combination is pressed on the physical keyboard, and it also works when sent via AppleScript's System Events keystroke command.

Steps to reproduce

  1. Set FluidVoice's dictation hotkey to Cmd+Shift+J.
  2. In SteerMouse, assign a mouse button to send the keyboard shortcut Cmd+Shift+J directly (SteerMouse's native "send keystroke" action).
  3. Click the configured mouse button while FluidVoice is running.
  4. Dictation does not start.
  5. Press Cmd+Shift+J on the physical keyboard → dictation starts normally.
  6. Trigger the same combination via an Automator app running:
    tell application "System Events"
        keystroke "j" using {command down, shift down}
    end tell
    → dictation starts normally.

Expected behavior

The hotkey should trigger regardless of whether the key event originates from a physical keypress, a synthetic event posted by a third-party utility (SteerMouse, likely also BetterTouchTool, Keyboard Maestro, Stream Deck, etc.), or an AppleScript keystroke command.

Likely cause

Looking at GlobalHotkeyManager.swift, the hotkey is captured via a CGEventTap at .headInsertEventTap, listening for keyDown, keyUp, and flagsChanged. My guess is that events posted by utilities like SteerMouse use a different event source / eventSourceStateID (e.g. posted directly via CGEventPost at the HID level or with a different session state) than events generated through the Accessibility/Apple Events path (System Events keystroke), and that FluidVoice's tap — or something upstream of it — is filtering out one of these sources while accepting the other.

Environment

  • FluidVoice version: 1.6.4
  • macOS: [please fill in your macOS version]
  • Mouse utility used: SteerMouse [version]

Happy to provide more debug info (event source IDs, tap location, etc.) if useful — thanks for the great app!

Proposed solution

Suggested fix

If the hotkey filtering is intentional (e.g. to avoid loops or spoofed input), it would be great to either:

  • Relax the filter to also accept legitimately synthetic events from trusted/accessibility-permitted sources, or
  • Document the limitation and the System Events keystroke workaround for users of macro/mouse utilities.

Alternatives considered

Workaround

Currently working around this by having the mouse button launch a small Automator .app that sends the shortcut via System Events keystroke instead of using SteerMouse's native synthetic keystroke action. This works reliably but is an extra layer that other users with similar setups (programmable mice, macro pads, Stream Deck, etc.) would have to discover on their own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions