Repository navigation
Dictation key: Right Option starts on press again - #2014
Merged
Merged
Conversation
The one-key change made Right Option (the default dictation key) Push to Talk. Push to Talk on a modifier that Option-M also uses waited out the 0.14 s chord delay before every start, so each hold began 0.14 s later than Right Option did in 1.1.69, where it fired on press. Push to Talk on a shared modifier now fires on press like the hands-free key: unless a key was typed in the last second or the press would stop a take. A combo key while it's held (Option-M, Right Option+E) sends .comboInterrupted and the start is dropped quietly through abandonDictationStartForModifierCombo, the same path hands-free uses. The hands-free press handlers move to ContextCaptureEngine+DictationKeys so ContextCaptureEngine.swift stays under its line baseline. Claude-Session: https://claude.ai/code/session_01DEL5vVKCBRYCvxaT5GS1nA
Review of the first commit: the Push to Talk combo tracker stayed armed for the whole hold, so Esc, an arrow or Return a minute into a hold would have dropped the take and its audio with no message. PushToTalkModifierComboWindow counts a key as a combo only inside the 0.14 s chord window after the press, the window the delayed press used to wait out. A key later in the hold is typing, as on main. Tests cover inside the window, late in a hold, after release, and after a tap reset. Claude-Session: https://claude.ai/code/session_01DEL5vVKCBRYCvxaT5GS1nA
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.
Requested by Justin · project thread
Why
Before: on main and in the 1.1.70 draft, the default dictation key is Right Option on Hold or tap. That registers it as Push to Talk. Option-M (meetings) also uses Option, so every Right Option press went through the 0.14 s chord delay (
modifierChordDelay,DispatchQueue.main.asyncAfter) before dictation started. In 1.1.69, Right Option was the hands-free key and started on press (#1858). So each hold now starts about 0.14 s later.start_latency_msdoesn't show it, because its clock starts atstartDictation, after the delay.After: a Push to Talk key on a shared modifier starts on press. If a key was typed in the last second, or the press would stop a take, it still waits out the chord delay. A key that goes down inside the 0.14 s window after the press (Option-M, Right Option+E) is a combo: the detector sends
.comboInterruptedand the start is dropped throughabandonDictationStartForModifierCombo, the same path hands-free uses. A key later in the hold is just typing during the hold, the same as on main, and never drops the take.Product Impact
dictationdictation reliabilityWhat changed
PhysicalShortcutMatcher.swift: newPushToTalkModifierComboWindow. It wrapsHandsFreeModifierComboTracker, but a keyDown counts as a combo only inside the window.ContextCaptureEngine.swift:firesSharedModifierOnPressand fires on press.(.dictationPushToTalk, .comboInterrupted).ContextCaptureEngine+DictationKeys.swift:handlePhysicalDictationPushToTalkComboInterrupteddrops that session, or the queued start if the press only queued one.ContextCaptureEngine.swiftstays at its 842-line baseline.shouldAcceptHotkeyActionwent from file-private to internal for that move.Tests/PhysicalShortcutMatcherTests.swift: a combo inside the window, a key late in a hold (it must not drop the take), a key after release, and a key after a tap reset.Sources/Capture/AGENTS.md: docs and the manual-check line.Known and documented: on a built-in or wired mic, the start click plays on key press. So Right Option+M or Right Option+E after a 1 s pause clicks and briefly shows the island before the start is dropped. 1.1.69's Right Option hands-free key did the same.
How I checked it
scripts/dev/agent-preflight.shbash scripts/dev/linux-checks.sh(runs without Swift): 65 passed, 0 failed.agents/test-matrix.ymlfor the files changed (CIchecks: green on 4d0461d)bash build.sh --no-open(CIapp-build: green on 4d0461d)bash run-tests.sh(CIbuild-and-test: green on 4d0461d)bash run-integration-smoke.sh(not touched)swift test(CIspm-tests: green on 4d0461d)bash run-e2e-smoke.shChecks I could not run, and why:
Mac or hardware test still needed? Yes, on the default key (Right Option, Hold or tap):
Risk Review
check-source-pins.py --changed-only: PASSNotes
Found during the dictation speed pass (
/mnt/project-files/speed/2026-10-05/dictation.md). Review verdicts:/mnt/project-files/reviews/next-release/2014.md.Agent handoff
COORD_DONE: GREEN | this PR | Right Option push-to-talk fires on press, combo only inside 0.14 s | none | none (approved for 1.1.70) | linux-checks, CI green on 4d0461d, deep review READY | lanes used: Codex=n/a (cloud session); Claude=n/a (cloud session); Local=n/a; Windows=n/a | Mac steps 1-5 in the 1.1.70 test🤖 Generated with Claude Code
https://claude.ai/code/session_01DEL5vVKCBRYCvxaT5GS1nA