Dictate into code and terminals
Learn to dictate into an IDE and a terminal the way a developer actually works: let InkSpoke detect where your cursor is, shape the output to fit, type it in without touching your clipboard, and rewrite code you've already selected — all by voice.
What you'll learn
- How code-aware and terminal-aware refinement kick in automatically based on the app you're dictating into.
- Why terminals and editors get typed into (SendKeys) instead of pasted, and what that protects.
- How to use Command Mode to transform code you've already selected.
- Practical ways to tip InkSpoke toward the exact symbols, identifiers, and commands you mean.
- When to toggle AI refinement off for a literal, verbatim command.
Prerequisites
Before you start, you'll want:
- InkSpoke installed and set up on your desktop, with a speech model downloaded. If you haven't done this yet, follow Install and set up InkSpoke.
- One successful dictation under your belt so the press-speak-press loop feels familiar. See Your first dictation.
- An IDE and a terminal open to practice in — for example VS Code and Windows Terminal, or your editor and shell of choice.
On macOS, InkSpoke reads the foreground app and window title through the Accessibility permission — that's what lets it tell an editor from a terminal. If code/terminal detection never triggers, confirm InkSpoke has Accessibility access in System Settings. On Windows this uses UI Automation; on Linux, xdotool / xclip.
Time estimate
About 10 minutes for the walkthrough, plus a few minutes if you decide to set up a workspace or dictionary entries at the end.
How the pieces fit for code
Two things happen automatically when you dictate into a developer tool, and they're driven by the same pair of detectors:
- Refinement adapts. InkSpoke reads the foreground app. If it's a recognized editor, refinement switches to code-aware output (and reads the file's language from the window title). If it's a recognized terminal, it switches to terminal-aware output so a dictated command stays runnable.
- Delivery adapts. In the default Auto injection mode, terminals and editors are typed into character-by-character (SendKeys), while ordinary apps get a clipboard paste.
Both behaviors are controlled by two settings, and both are on by default:
| Setting | Default | What it gates |
|---|---|---|
IdeIntegrationEnabled | On | Code-aware refinement + file-language detection for editors, and Auto typing into editors. |
TerminalModeEnabled | On | Terminal-aware refinement for terminals, and Auto typing into terminals. |
Each toggle does double duty — it shapes how refinement writes (code vs terminal vs standard) and how the text is delivered (typed vs pasted). Turning one off disables both jobs for that app category.
Step 1 — Confirm the detectors are on
You almost certainly don't need to change anything here — both toggles ship on — but it's worth a look before you start.
- Open the desktop app's General settings and hotkeys.
- Find the text-injection / detection options and confirm IDE integration (
IdeIntegrationEnabled) and Terminal mode (TerminalModeEnabled) are enabled. - Leave Text injection mode on Auto — that's what routes editors and terminals to typing while everything else pastes.
InkSpoke recognizes editors and terminals by process name. The current lists:
| Category | Recognized processes |
|---|---|
| IDEs / editors | code, cursor, rider, idea, xcode, vim, nvim, emacs, sublime, atom, fleet |
| Terminals | terminal, iterm, warp, wezterm, alacritty, konsole, gnome-terminal, kitty, hyper, cmd, powershell, wt |
If your tool is on one of these lists, everything in this tutorial works with zero configuration.
Step 2 — Dictate into your IDE
Now put your cursor in a code file and dictate.
- Click into your editor — say, a
.tsfile open in VS Code — where you want text to appear. - Press the activation hotkey and speak a comment or a line of prose you'd like in the code.
- Press the hotkey again (or click Send) to finish.
| Platform | Start / stop dictation |
|---|---|
| Windows / Linux | Alt + Space |
| macOS | ⌥ + Space |
The familiar listening overlay appears while you speak:
┌─────────────────────────────────────────────────┐
│ ● Listening… ⏱ 0:04 │
├─────────────────────────────────────────────────┤
│ ▁▃▅▇▅▃▁▂▄▆▄▂ "add a comment explaining the │
│ retry loop" │
│ │
│ [ Workspace ▾ ] [ EN ▾ ] [ Send ] │
├─────────────────────────────────────────────────┤
│ ESC cancel · Alt+Space finish │
└─────────────────────────────────────────────────┘
What happens under the hood: because the process is code, refinement uses code-aware output. And because the window title shows app.ts, InkSpoke also knows you're in TypeScript and refines with that in mind — keeping identifiers and code intact rather than "prose-ifying" them. The result is typed in character-by-character, so your clipboard is left exactly as it was and your editor's autocomplete doesn't rewrite the text mid-paste.
InkSpoke maps common extensions to languages from the window title:
| Extension | Language | Extension | Language |
|---|---|---|---|
.cs | C# | .rs | Rust |
.py | Python | .java | Java |
.js | JavaScript | .rb | Ruby |
.ts | TypeScript | .cpp / .c / .h | C/C++ |
.go | Go |
If the language can't be read from the title, refinement still uses code-aware output — it just won't be language-specific.
Step 3 — Dictate into your terminal
Terminals are the same loop, with two developer-friendly differences.
- Focus your terminal (Windows Terminal, PowerShell, iTerm2, etc.).
- Press the activation hotkey, speak the command you want, then press it again to finish.
Because the app matches a terminal pattern, refinement uses terminal-aware output — tuned to produce something safe to run rather than a polished paragraph — and the text is typed in, not pasted. Two things this buys you:
- Your clipboard is never borrowed. Per-character typing skips the clipboard entirely, so whatever you had copied stays put.
- Spaces survive. Typing is paced so shells don't drop word-boundary spaces the way a bulk paste sometimes does.
The trade-off is that per-character typing is visibly slower on long text — which is exactly why you can stop it:
While InkSpoke is typing into a terminal or editor, press Esc (or say your voice cancel word, "stop") to halt the remaining keystrokes. Characters already typed stay, the dictation is still saved to history, and a balloon reports how far it got. See Text injection for the full behavior.
Step 4 — Transform selected code with Command Mode
Dictation writes new text. Command Mode rewrites text you already have — a natural fit for editing code and comments in place.
- Select the code or comment you want to change, right in your editor or terminal.
- Press the Command Mode hotkey.
- Speak an instruction — "add a docstring," "rename this variable to something clearer," "translate this comment to English," "make this command a one-liner."
- Press the hotkey again (or click Send). InkSpoke sends your selection plus the instruction to your text model and types the result back over the selection.
| Platform | Command Mode |
|---|---|
| Windows / Linux | Alt + Shift + C |
| macOS | ⌥ + ⇧ + C |
InkSpoke captures the selection first, before recording — so the order is always select, then trigger. In a terminal it uses a terminal-safe copy (Ctrl + Shift + C) so your shell isn't interrupted by a stray keystroke.
Command Mode leaves your selection untouched in every failure case: nothing selected, nothing spoken, or the model erroring out all return your text unchanged. So it's safe to experiment — if a rewrite isn't what you wanted, reselect and try a different instruction. Full details in Command Mode.
Command Mode runs on whatever text-processing model you have active. If you're in Local mode, the transform runs on your on-device model — so you can refactor and rewrite completely offline.
Step 5 — Tip InkSpoke toward the exact symbols and commands you mean
Code has terms and tokens that ordinary speech doesn't. A few grounded ways to get consistent results:
- Teach it your project's terms with a workspace. A workspace for your codebase can carry custom vocabulary (fed to the recognizer and the model) plus tone and domain context, applied automatically when your editor is focused. The guided wizard even has a Software Engineering domain and a Code Comments purpose to start from. See Build a workspace for your domain.
- Map spoken words to exact tokens with the personal dictionary. Whole-word, case-insensitive substitutions turn what you say into what you mean — for example spoken "gpt" becomes
GPT. Add entries for the identifiers and acronyms you dictate often. See Personal context and dictionaries. - Lean on code-aware refinement for formatting. When AI refinement is on and your editor is detected, refinement already works to keep identifiers and code structure intact rather than turning them into prose.
- Toggle refinement off when you want the words verbatim. For a command you want typed exactly as spoken — no reshaping — turn AI refinement off with its hotkey. When it's off, your raw transcription is injected verbatim.
| Platform | Toggle AI Refinement |
|---|---|
| Windows / Linux | Alt + Shift + R |
| macOS | ⌥ + ⇧ + R |
When refinement is off, the listening overlay shows "AI refinement off" so you always know which mode you're in.
Expected result
You've got the full developer loop working when:
- Dictating into your IDE produces code-aware text, in the right language for the file, typed in without disturbing your clipboard or autocomplete.
- Dictating into your terminal produces a runnable command, typed in with spaces intact — and you can hit Esc to stop a long one mid-type.
- Command Mode rewrites code or a comment you've selected, in place, and safely leaves your selection alone if anything goes wrong.
- Your recurring identifiers and acronyms come out correctly, thanks to a workspace vocabulary and/or personal-dictionary entries.
Troubleshooting
Refinement isn't adapting to code or terminal. First confirm AI refinement is actually on — if the overlay reads "AI refinement off," press the toggle hotkey (Alt/⌥ + Shift/⇧ + R). Then confirm IDE integration and Terminal mode are enabled in settings. On macOS, make sure InkSpoke has Accessibility permission so it can read the active window at all.
My editor pastes instead of typing (or my clipboard gets used). Auto types only into apps it recognizes by process name (see the lists in Step 1). If your tool isn't listed, Auto treats it as an ordinary app and pastes. You can keep Auto for everything else and, if you specifically want per-character typing everywhere, set Text injection mode to SendKeys — at the cost of slower delivery on long text. See Text injection.
Command Mode did nothing / my selection didn't change. Command Mode needs a real text selection captured before you trigger it, and some apps don't expose their selection to the OS. Re-select the text, then press the hotkey. In terminals, InkSpoke uses a terminal-safe copy — if your terminal remaps Ctrl + Shift + C, selection capture may come up empty, in which case nothing changes (your text is safe).
Typing into the terminal is too slow, or I typed the wrong thing. Per-character typing is deliberate so it's interruptible: press Esc or say "stop" to halt it. Everything typed so far stays. For long, non-secret text into an ordinary app, a clipboard paste (Auto's default for non-terminals) is instant — the slowness is specific to the SendKeys path terminals and editors use.
Next steps
- App-aware tone and code — the full reference for code/terminal detection, the process lists, and file-language mapping.
- Command Mode — every way to transform selected text, including the wake-word trigger.
- Text injection — Auto vs SendKeys vs clipboard, Remote Desktop handling, and the safety nets.
- Build a workspace for your domain — teach InkSpoke your codebase's vocabulary and tone.
- Personal context and dictionaries — exact word substitutions for identifiers and acronyms.
- InkSpoke for developers — how the whole toolkit fits a developer's workflow.