feat(hotkey): configurable hold-to-record hotkey#15
Merged
Conversation
Users can now rebind the hold-to-record key from Settings instead of being locked to fn. Motivated by Logitech MX Keys + Logi Options+, which swallow the fn keystroke at the driver level so the existing event tap never sees it. - HotKeyBinding stores the chosen modifier (keyCode + flag bit + name); persisted in UserDefaults, posts a change notification. - HotKeyManager reads the active binding, distinguishes left vs right modifier sides, and refreshes live when the user changes it. - SettingsView adds a click-to-capture button. Press any modifier (Shift, Cmd, Option, Control, fn, Caps Lock) to bind; Esc cancels; letters / F-keys are rejected with an inline warning. Default remains fn so existing installs are unaffected.
feb6f19 to
7b514a1
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.
Summary
Users can now rebind the hold-to-record key from Settings instead of being locked to
fn. Motivated by Logitech MX Keys + Logi Options+, which swallow thefnkeystroke at the driver level so the event tap never sees it. Diagnostic on an MX Keys keyboard confirmedfn(hold, tap, Globe) emits zero events, while every other modifier (Shift, Cmd, Option, Control, Caps Lock) on both sides works normally.Changes
HotKeyBindingstores the chosen modifier (keyCode + flag bit + display name). Persisted inUserDefaults, posts a change notification.HotKeyManagerreads the active binding, distinguishes left vs right modifiers, refreshes live when the user changes it (no app restart needed).SettingsViewadds a click-to-capture button. Press any modifier (Shift, Cmd, Option, Control, fn, Caps Lock) to bind; Esc cancels; letters / F-keys are rejected with an inline warning.fn, so existing installs are unaffected.Allowed keys
Modifier-style only:
fn, Left/Right Shift, Left/Right Cmd, Left/Right Option, Left/Right Control, Caps Lock. Non-modifier keys are intentionally rejected because holding a regular key for the entire utterance would break typing that key everywhere else.Verification
swift buildclean.