FixesMac6 min read
Dictation not working in VS Code, Terminal, or Claude Code
Dictation not working in VS Code or Terminal? Electron apps read the clipboard late, and some terminals drop simulated keys. Here are the fixes.
Published by Optimal Apps, the maker of Petal.
On this page
Dictation not working in VS Code, Terminal, or Claude Code? One of two causes is almost always behind it. First, Electron apps such as VS Code, Cursor, and Slack read the clipboard late, so a dictation app that restores your old clipboard too soon makes them paste the old content. Second, some terminals and terminal apps drop simulated keystrokes, so a dictation app that "types" the text gets nothing in. The fix is to give the paste more time, or to switch the dictation app from typing to a clipboard paste.
This guide explains both causes and gives the fixes for Superwhisper, VoiceInk, Wispr Flow, and Aqua Voice, then explains how Petal handles code editors.
Dictation not working in VS Code or a terminal: quick-fix checklist
| What you see | Cause | Fix |
|---|---|---|
| Old clipboard text pastes in VS Code or Cursor | Clipboard restored before the app read it | Raise the restore delay, or keep the transcript on the clipboard |
| Nothing pastes in a terminal | Terminal drops simulated keystrokes | Use a clipboard paste, or the app's "paste last transcript" shortcut |
| Text pastes in the editor, not the integrated terminal | Focus is in the wrong pane | Click the terminal pane before you dictate |
| Text pastes twice | Typing and paste both ran | Turn off "simulate keypresses" for that app |
| A strange character or no paste after a hotkey | Hotkey modifiers still held during Command-V | Release all keys before the paste |
| Nothing pastes anywhere | Accessibility missing | Reset Accessibility for the app |
Cause 1: Electron apps read the clipboard late
Most Mac dictation apps paste in four steps:
- Save your current clipboard.
- Put the transcript on the clipboard.
- Send Command-V to the front app.
- Put your old clipboard back.
Native apps, such as TextEdit, read the clipboard at once when they get Command-V. Electron apps, such as VS Code, Cursor, Slack, and Discord, can read it a moment later. If step 4 happens first, the app pastes your old clipboard. The result looks like "dictation pastes the wrong text in VS Code".
Vendor fixes for late clipboard reads
Superwhisper. Its pasting guide says:
- Open Settings > Configuration > Advanced settings and scroll to Text input.
- Set Clipboard content to Replace with dictation. The default, Keep what I have copied, restores your old clipboard after the paste.
- Test. Your earlier clipboard content is gone after each dictation.
The same page says to click into the editor and keep it focused until dictation finishes, and to check that the mode's auto paste option is Default or On.
VoiceInk. Its clipboard guide says:
- Open Settings > Pasting.
- Keep Keep Clipboard Content on.
- Raise Restore Delay. The default is 2 seconds, and the range is 250 ms to 5 seconds.
More detail is in VoiceInk not pasting.
Aqua Voice. The Aqua changelog lists a fix for a paste bug in VS Code and Cursor in v0.11.6. Update to the latest version.
For Superwhisper's version of this problem, see Superwhisper pastes old clipboard.
Cause 2: Terminals drop simulated input
Some dictation apps do not paste. They "type" the text with simulated key events. Some terminal apps accept only real keystrokes or a real paste, and drop the rest.
GitHub issue #51725 on the anthropics/claude-code repository is an example. The reporter used Aqua Voice v0.14.2 in the Cursor integrated terminal (PowerShell) on Windows 11. Dictated text was silently dropped in the Claude Code prompt, while it worked at a plain PowerShell prompt. The reporter's theory, not confirmed, was that Aqua sends simulated keystrokes and Claude Code accepts only bracketed paste. Aqua's Paste Last Transcript, which uses the clipboard, worked. The issue was closed as a duplicate of a related report about simulated paste on Windows.
The same idea applies on a Mac: if the text arrives as typed keys and the terminal app drops them, switch to a clipboard paste.
Vendor fixes for terminals
Aqua Voice. Dictate, then press Paste Last Transcript. Aqua's changelog gives the Mac default as Control-Command-V, and you can change it in Settings.
Wispr Flow. Press Control-Command-V to paste the last transcript. Wispr's guide notes that some terminals and IDEs use a different paste command, such as Control-Shift-V or a right-click paste, so check the terminal's paste command.
Superwhisper. For terminals that block paste, its guide suggests turning on Simulate keypresses in Text input. That types the result with a virtual keyboard. It is experimental, supports only US QWERTY, and can cause a double paste in apps that paste normally. So turn it on only when a paste fails.
VoiceInk. Set Settings > Pasting > Paste Method to AppleScript if the default paste does nothing.
Cause 3: Focus and modifier keys
Two small problems look like a broken paste:
- Focus. In VS Code, the editor, the integrated terminal, and the chat panel are separate fields. Click the pane you want before you dictate, and do not click elsewhere until the text arrives.
- Held modifiers. If your dictation hotkey uses Option or Control and you still hold it when the app sends Command-V, the app gets Option-Command-V or Control-Command-V. That is a different shortcut. Release all keys before the transcript is ready.
Cause 4: Accessibility
If nothing pastes in any app, the dictation app does not have Accessibility access. Fix that first: Accessibility permission not working after an app update.
How Petal handles VS Code, terminals, and coding agents
Petal for macOS is a free, open-source dictation app that runs speech models on your Mac. Its paste step was built with Electron apps and terminals in mind. From the app's code:
- A 700 ms restore delay. Petal puts the transcript on the clipboard, sends Command-V, and restores your old clipboard 700 ms later. The code comment states the reason: "Electron apps such as VS Code read the clipboard some time after Command-V, so an early restore pastes the old content."
- No overwrite of a new copy. If you copy something during those 700 ms, Petal keeps your new copy.
- A real paste, not typed keys. Petal sends Command-V, so terminal apps that accept a paste get the text as a paste.
- Modifier release. Petal waits up to 400 ms for you to release keys such as Option and Control before it sends Command-V.
- Restore Clipboard switch. If an app still pastes the old content, turn off Restore Clipboard in Settings > Recording. The transcript then stays on the clipboard.
Use the Router for code editors
In Settings > Router, you can add a route for each app or website. Each route can have its own style:
- As Said pastes the words exactly as you said them, with no cleanup. Use it for a terminal, where a rewrite can change a command.
- AI Prompt "writes a prompt for an AI agent". Use it for Claude Code, Codex, or a chat panel in your editor.
- Custom lets you write your own instructions, for example "keep code terms and file names exactly as spoken".
Cleanup can run on your Mac with Petal W1 or Apple Intelligence, or with a cloud model and your own key. Read more in per-app dictation cleanup on Mac.
Send without a second key
In Settings > General, Send Now lets you press Control-X then Control-S while you record. Petal stops, pastes, and presses Return. In a terminal, that runs the prompt. If a paste ever fails, set a Paste Last Transcription shortcut in the same pane to paste your most recent transcript again.
If you use Aqua Voice and it fails in terminals, also read Aqua Voice not working.
Questions
Why does dictation paste old clipboard text in VS Code?
Most dictation apps put the transcript on the clipboard, send Command-V, and then restore your old clipboard. VS Code and other Electron apps can read the clipboard after that restore, so they paste the old content. Raise the app's restore delay, or let it keep the transcript on the clipboard.
Why does dictated text not appear in Claude Code?
GitHub issue #51725 reports that Aqua Voice text was silently dropped in Claude Code on Windows. The reporter thought Aqua sent simulated keystrokes that Claude Code did not accept, while clipboard paste worked. Use a paste-based method, such as Paste Last Transcript.
Does Apple Dictation work in Terminal on Mac?
Apple Dictation types into the focused field in most apps, including Terminal, but results in terminal apps vary. If text does not appear, dictate into another app and paste, or use a dictation app that pastes with Command-V.
Can I use a different dictation style for my code editor?
Petal's Router lets each app use its own cleanup. You can set your terminal or editor to As Said, so Petal pastes exactly what you said, or to the AI Prompt preset for coding agents.