Skip to content

fix(hotkeys): support F13–F20 and the native Mac Dictation key - #1040

Draft
Eclock2000 wants to merge 3 commits into
Open-Less:betafrom
Eclock2000:fix/macos-dictation-function-keys
Draft

fix(hotkeys): support F13–F20 and the native Mac Dictation key#1040
Eclock2000 wants to merge 3 commits into
Open-Less:betafrom
Eclock2000:fix/macos-dictation-function-keys

Conversation

@Eclock2000

@Eclock2000 Eclock2000 commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Support F13–F20 and add the native Mac microphone/Dictation key to the existing dictation shortcut menu. Selecting it replaces the current binding; there is still one dictation trigger.

Changes

  • Accept F13–F20 in shared validation, platform key mappings, and frontend capture, including WebKit private-use function-key characters.
  • On macOS, route native Dictation-key press/release events into the existing recording modes. Consume only an unmodified native press and its paired repeats/release. Ordinary F5, F20, and modified native presses pass through; capture does not begin during Secure Event Input.
  • Register the selected key through the existing settings transaction. Failed registration retains the previous binding and displays an error. Switching away or quitting releases native interception.
  • Preserve the existing side-aware event channel during failed-switch rollback.

The native option requires a compatible Mac keyboard and Accessibility permission. There is no setup wizard, extra trigger, saved fallback binding, status polling, or dedicated retry UI. The shared preference schema and hotkey event loops are unchanged.

Validation

  • TypeScript/Vite production build and frontend recorder tests passed.
  • 36 exact-source Rust harness tests passed for key parsing, native-key state transitions, and side-aware routing, including failed-switch restoration.
  • 11 Core settings transaction tests passed, covering runtime and persistence failures.
  • Final macOS arm64 application build and ad hoc signature verification passed (npm run tauri -- build --bundles app; codesign --verify --deep --strict).
  • Earlier stable-backport hardware checks confirmed F20 through a remap and native keycode 176 interception without opening macOS Dictation; Fn+F5 remained ordinary F5.

Integrated beta recording/text insertion, restart behavior, and Windows hardware behavior have not been manually verified. These limitations are disclosed for review; the earlier hardware checks are not full beta application acceptance.

@Eclock2000 Eclock2000 changed the title fix(hotkeys): 支持专用 F20 与 Mac 原生听写键 fix(hotkeys): support F13–F20 and the native Mac Dictation key Sep 8, 2026
@Eclock2000
Eclock2000 marked this pull request as ready for review September 8, 2026 01:01
@Eclock2000
Eclock2000 marked this pull request as draft September 8, 2026 01:03
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