Skip to content

add microphone key alone lab - #1864

Merged
thdxr merged 3 commits into
devfrom
mic-key-shortcut
Nov 15, 2026
Merged

thdxr merged 3 commits into
devfrom
mic-key-shortcut

Conversation

@thdxr

@thdxr thdxr commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

on apple laptop keyboards the microphone (dictation) key in the top row is a normal keyDown/keyUp for virtual keycode 176 with SecondaryFn always set (observed flags 0x800100). the recorder had no character for it, so it said "unsupported key", and a binding that implied Fn would never match anyway.

this adds a macOS-only Labs feature, off by default, under Shortcuts: Microphone key alone (microphone-key, labs.microphone_key). with it on, the recorder takes the key by itself and saves {code: 176, label: "Mic"}, and hex settings set dictation_hotkey mic|microphone works too. matching ignores SecondaryFn for this one key only, so Fn stays significant for every other key.

the lab gates every shortcut on that key, with or without modifiers. with the lab off nothing changes from before this feature: the window refuses the key as "Unsupported key", hex settings refuses it pointing at hex labs on microphone-key, and any saved shortcut on the microphone key is put back to its default when settings load or the toggle turns off.

if macOS's own Dictation still opens, the key may be handled before Hex's event tap sees it; the card and docs say to move macOS's dictation shortcut in System Settings › Keyboard › Dictation.

closes #181

thanks @ViaxCo for the detailed investigation of the key code and Fn flag in the issue.

@thdxr
thdxr merged commit 58f5cd5 into dev Nov 15, 2026
5 checks passed
@thdxr
thdxr deleted the mic-key-shortcut branch November 15, 2026 20:29
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.

Allow the mic/Dictation key (F5) as the dictation shortcut on macOS

1 participant