Ergonomics & Systems Architecture · Updated November 25, 2026
Hold-Ctrl Push-to-Talk Dictation on Mac & Linux Without Breaking Ctrl+C
Ctrl hook fires every time you press Ctrl+C in a terminal or Ctrl+Click in Finder. FlowSpeak solves this with a 150 ms chord cancellation window: the microphone stays closed during the first 150 ms and aborts immediately if any other key or mouse button is pressed. You get effortless one-finger push-to-talk without losing a single shell shortcut.
Why toggle dictation shortcuts fail in daily coding and writing
Built-in Apple Dictation and most desktop wrappers use a toggle shortcut: press once to start listening, speak, and press again to stop. In practice, toggle dictation introduces three constant failure modes:
- Forgotten open microphones: You finish dictating a prompt into Cursor or Slack, start reading code, sigh or mutter out loud, and watch garbage text spill into your active editor buffer.
- Bluetooth headphone audio degradation: Any app that keeps a microphone input stream open in the background forces macOS Bluetooth headphones (AirPods and Sony/Bose headsets) out of high-bitrate A2DP stereo into low-bandwidth HFP call quality. FlowSpeak opens
miniaudiocapture only after the 150 ms hold threshold passes and closes the audio device the instant you releaseCtrl. - Cognitive boundary friction: When physical hold duration matches speech duration, your fingers already know when the microphone is live. Release the key and the text is pasted 35 ms later.
How FlowSpeak's 4-state Hold-Ctrl machine protects Ctrl+C, Ctrl+R, and Ctrl+Click
On macOS, FlowSpeak registers a passive CGEventTap listening for kCGEventFlagsChanged, kCGEventKeyDown, and mouse button events (on Linux, it reads raw key states via evdev or receives compositor IPC signals). Every press of Ctrl walks through four explicit states:
| State | Timing / Trigger | What FlowSpeak Does |
|---|---|---|
| 1. Armed (Chord Guard) | 0 ms – 150 ms after Ctrl keydown | Microphone stays closed. If any non-modifier key (C, V, Z, R, A, Tab) or mouse click (Ctrl+Click) occurs, state resets to Idle immediately. |
| 2. Hold-Recording | Held past 150 ms alone | Opens 16 kHz mono capture and shows the non-stealing HUD pill. If a chord key is pressed mid-hold, recording aborts without pasting. |
| 3. Hands-Free Latched | Double-tap Ctrl within 350 ms | Locks recording on for multi-paragraph dictation so you can take your finger off the keyboard. Tap Ctrl once to transcribe and paste, or press Esc to discard. |
| 4. Transcribe & Restore | Ctrl release (after ≥180 ms speech) | Closes the mic device, runs in-process whisper.cpp v1.9.5 (~35 ms on Apple Silicon Metal), pastes via transient clipboard snapshot, and restores your clipboard 80 ms later. |
How FlowSpeak pastes into any app without polluting clipboard managers
Directly injecting characters one keystroke at a time via accessibility APIs is slow and breaks inside Electron editors (VS Code, Cursor, Slack) and web terminals that intercept synthetic key events. Pasting via the system clipboard is universal and instant, but naive clipboard pasting ruins your workflow by overwriting whatever code snippet or URL you just copied.
FlowSpeak preserves your clipboard and keeps history managers clean in four steps:
- Full pasteboard snapshot: Before writing the transcript, FlowSpeak snapshots every item and UTI representation currently on
NSPasteboard.generalPasteboard(orwl-clipboard/xclipon Linux). - Transient UTI markers: FlowSpeak writes the transcribed text along with
org.nspasteboard.TransientType,org.nspasteboard.AutoGeneratedType, andde.petermaurer.TransientPasteboardType. Raycast Clipboard History, Paste, Maccy, Alfred, and LaunchBar recognize these standard markers and skip recording the temporary dictation payload. - Context-aware spacing and mid-sentence casing: Before synthesizing
Cmd+V, FlowSpeak reads the 32 characters around the focused cursor viaAXUIElementCopyAttributeValue. If your cursor sits mid-sentence after a comma or lowercase word, Apple's on-deviceNLTaggerlowercases the first word of the transcript unless it is a proper noun (`I`, `Monday`, `Kubernetes`) or technical identifier. - 80 ms restoration: After the target application consumes the
Cmd+Vevent, FlowSpeak restores your original clipboard snapshot byte-for-byte.
Password field protection via IsSecureEventInputEnabled()
What happens if you accidentally hold Ctrl while focus sits inside a password prompt, sudo terminal prompt, or 1Password / Keychain modal? FlowSpeak checks macOS IsSecureEventInputEnabled() and inspects the focused Accessibility role for AXSecureTextField. Whenever secure input is active, FlowSpeak refuses to inject text or log history.
Remapping the hotkey on macOS and Linux tiling window managers
While Control is the default because it sits under your left pinky or palm on standard layouts (and works seamlessly when Caps Lock is mapped to Control), you can switch the trigger at any time:
- macOS menu bar or
config.json: Switch betweenControl,Fn / Globe,Right Option, orRight Command. - Linux X11 & Wayland compositors (
sway,Hyprland,i3, GNOME, KDE): Use the built-inevdevhold listener or bind any compositor key toflowspeak --ipc down,flowspeak --ipc up, orflowspeak --ipc toggleover the local Unix domain socket.
Frequently Asked Questions
Why isn't FlowSpeak on the Mac App Store if it is signed and notarized by Apple?
Apple's Mac App Store App Sandbox (Guideline 2.4.5) forbids global CGEventTap modifier monitoring and synthetic Cmd+V paste injection into other applications. To deliver true system-wide Hold-Ctrl push-to-talk, FlowSpeak is distributed directly as an Apple Developer ID signed, Hardened Runtime enabled, double-notarized Universal DMG (`spctl` verified).
Can I dictate technical identifiers like kubectl, whisper.cpp, or .env?
Yes. Add project jargon, repository names, and acronyms to your Personal Dictionary (`dictionary.json`), which biases Whisper's initial decoder prompt and runs deterministic post-replacement in under 1 ms. You can also define spoken voice snippets (for example, saying insert email signature to expand a multi-line block).
Test Hold-Ctrl dictation in your own terminal and editor
Download FlowSpeak for macOS 12+ (~11 MB Universal DMG + local Whisper model, 141 MB default, or reuse existing GGML models on disk), install via brew install --cask smolkapps/tap/flowspeak, or download Linux x86_64 (4.2 MB binary + model). Your first 25 dictations are completely free with no account, credit card, or cloud login. Claim a $49 Founding Lifetime Pass (limited cohort) or subscribe for $9/mo ($69/yr) across up to 3 computers.