Skip to content

feat(hotkey): configurable hold-to-record hotkey#15

Merged
PatelUtkarsh merged 1 commit into
mainfrom
feat/configurable-hotkey
May 19, 2026
Merged

feat(hotkey): configurable hold-to-record hotkey#15
PatelUtkarsh merged 1 commit into
mainfrom
feat/configurable-hotkey

Conversation

@PatelUtkarsh
Copy link
Copy Markdown
Owner

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 the fn keystroke at the driver level so the event tap never sees it. Diagnostic on an MX Keys keyboard confirmed fn (hold, tap, Globe) emits zero events, while every other modifier (Shift, Cmd, Option, Control, Caps Lock) on both sides works normally.

Changes

  • HotKeyBinding stores the chosen modifier (keyCode + flag bit + display name). Persisted in UserDefaults, posts a change notification.
  • HotKeyManager reads the active binding, distinguishes left vs right modifiers, refreshes live when the user changes it (no app restart needed).
  • 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.

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 build clean.
  • Manual checklist (see commit message). External verification on Logi MX Keys + Logi Options+ pending.

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.
@PatelUtkarsh PatelUtkarsh force-pushed the feat/configurable-hotkey branch from feb6f19 to 7b514a1 Compare May 19, 2026 05:18
@PatelUtkarsh PatelUtkarsh merged commit 12a691d into main May 19, 2026
1 check passed
@PatelUtkarsh PatelUtkarsh deleted the feat/configurable-hotkey branch May 19, 2026 05:20
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