Skip to content

add --hotkey option to pick the push-to-talk key (fn or right-option) - #10

Open
tomiiide wants to merge 1 commit into
digimata:masterfrom
tomiiide:add-hotkey-option
Open

add --hotkey option to pick the push-to-talk key (fn or right-option)#10
tomiiide wants to merge 1 commit into
digimata:masterfrom
tomiiide:add-hotkey-option

Conversation

@tomiiide

Copy link
Copy Markdown

What

Implements the --hotkey run option that the README already documents (parrot --hotkey right-option) but the code never wired up: HotkeyMonitor was hardcoded to fn.

  • --hotkey fn (default): unchanged behavior.
  • --hotkey right-option: watches flagsChanged for the option mask filtered to keycode 61, so the left option key stays free for normal typing.
  • Unknown values fail with a clear error.
  • The startup line now names the active key.

Why

On the current macOS 27 developer beta (26A5388g, M1 MacBook Pro), the system stops delivering the bare fn flagsChanged event (keycode 63) to event taps entirely: fn still works as a modifier for other keys, but no standalone press event ever reaches the tap, so hold-fn push-to-talk can never trigger. Verified with an independent event-tap logger and --debug-hotkey: every other modifier arrives, fn alone is absent. An alternative hotkey makes parrot usable there (and for anyone whose fn key is otherwise claimed).

Testing

Built and ran on the affected machine. --hotkey right-option: press/release cycles record, transcribe, and type correctly, left option does not trigger it. Default fn path unchanged (verified via synthesized fn flagsChanged events, since the hardware key never emits on this OS build).

The README documents --hotkey right-option but the code hardwired fn.
Right option matches keycode 61 so the left key stays free for typing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant