Repository navigation
add microphone key alone lab - #1864
Merged
Merged
Conversation
thdxr
force-pushed
the
mic-key-shortcut
branch
from
November 15, 2026 19:30
18a084c to
bf90c31
Compare
thdxr
force-pushed
the
mic-key-shortcut
branch
from
November 15, 2026 19:55
7098548 to
11aa486
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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"}, andhex settings set dictation_hotkey mic|microphoneworks 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 settingsrefuses it pointing athex 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.