Short answer: If Mac dictation is not working in IntelliJ IDEA, click in the editor until the caret blinks, then dictate. If Run Anything or Search Everywhere opens instead, your shortcut is a double press that IntelliJ also uses. Change it, or turn off double modifier key shortcuts in Advanced Settings.
You are in IntelliJ IDEA with a method open and a comment to write, the kind that explains why the code does what it does. Saying it would take ten seconds, so you press your dictation shortcut. A box titled Run Anything appears on top of your code. Or the microphone shows up and your sentence goes nowhere. Or the words do land, and the editor has swapped two of them for class names, or a few lines of the file have gone missing.
Nearly all of this comes down to three facts about IntelliJ. It has no dictation of its own, so your words arrive as ordinary typing at whatever has keyboard focus, and in an IDE that is often a tree, a popup or a terminal and not the editor. It listens for quick double presses of the Shift and Control keys, which is the same kind of gesture Apple's dictation uses to start. And the editor assumes that everything typed into it is code, so it completes, indents and pairs brackets around a spoken sentence exactly as it would around a line of Java.
This guide works through the causes in the order that finds yours fastest. Everything here also applies to the other JetBrains IDEs, including PyCharm, WebStorm, PhpStorm, GoLand, Rider, CLion and RubyMine, and to Android Studio, which is built on the same platform. They share one editor and one set of settings. If dictation is failing in every app on your Mac, start with our full guide to Mac dictation not working and come back for the IntelliJ-specific parts.
How dictation reaches IntelliJ
IntelliJ IDEA has no microphone button and no voice typing setting. On a Mac you dictate with Apple's dictation or with a dictation app, and both deliver text to the place that has keyboard focus. IntelliJ cannot tell spoken words from typed ones, and that has two consequences.
First, IntelliJ does not need a microphone permission of its own for you to dictate into it. Apple dictation is part of macOS, and a dictation app holds its own permission. If nothing is typed, the cause is focus, a shortcut or a setting, not a missing permission for the IDE.
Second, every feature that reacts to typing also reacts to dictation: code completion, automatic indentation, bracket pairing, Vim emulation, speed search in tool windows. Most reports of broken dictation in IntelliJ are one of those features doing its job on text it did not expect.
The 30-second TextEdit test
Before you change any settings, open TextEdit, create a blank document and dictate one sentence the way you normally would.
- It fails in TextEdit too. The problem is your Mac's dictation settings, shortcut or microphone, not IntelliJ. Go to fix 10.
- It works in TextEdit, but in IntelliJ a popup opens when you press the shortcut. Go to fix 1.
- The microphone appears in IntelliJ, but nothing is typed. Go to fixes 2 and 5.
- The Project tree jumps, or a small search box appears over a tool window. Go to fix 3.
- Lines disappear or the caret leaps around the file. Go to fix 4.
- The text arrives, but words are swapped for code or a list keeps popping up. Go to fix 6.
- The text arrives, then turns red. Go to fix 7.
- The sentence shows up in several places, or with extra backslashes. Go to fix 8.
- The text went to the terminal, a search box or the commit message. Go to fix 9.
The 10 fixes, matched to what you see
1. A popup opens when you press the dictation shortcut
IntelliJ gives two of its most used commands to double presses of a modifier key. Press Shift twice and Search Everywhere opens. Press Control twice and Run Anything opens. Apple's dictation starts with the same kind of gesture: the shortcut choices under System Settings > Keyboard > Dictation include pressing the Control key twice, alongside options based on the Globe or Fn key, the Command keys and the microphone key.
If your dictation shortcut is Control pressed twice, macOS and IntelliJ both see the same two presses. Dictation may start, but Run Anything can open at the same moment and take keyboard focus, so your sentence is typed into the popup, where it is treated as something to run, or it goes nowhere at all. Press Escape to close the popup, then remove the overlap in one of two ways.
- Change the dictation shortcut. In System Settings > Keyboard > Dictation, choose a shortcut that IntelliJ does not use, such as the Globe key. Our guide to the Mac dictation keyboard shortcut not working goes through each option.
- Turn off IntelliJ's double presses. Open Settings in IntelliJ, go to Advanced Settings and tick Disable double modifier key shortcuts. Search Everywhere and Run Anything are still available from the menus, and you can give them a different shortcut in the keymap.
The microphone key has a catch of its own for developers. On recent Apple keyboards it shares a key with F5. If you have switched on the macOS option to use F1, F2 and the other function keys as standard function keys, which many people do so that the debugger's stepping keys work with a single press, the key sends F5 to IntelliJ and does not start dictation. In IntelliJ's default macOS keymap F5 is the Copy command, so a dialog about copying the current file can appear in place of the microphone. Hold Fn while you press the key, or choose another shortcut. Our guide to the Fn key not starting dictation has more on how that row of keys behaves.
If you use a dictation app with its own hotkey, the same rule applies. Two quick presses of Shift or Control will open those popups, and a hotkey that IntelliJ's keymap already uses will trigger that action as well. Pick a key that IntelliJ leaves alone.
2. The microphone appears, but nothing is typed
Dictation types where the keyboard focus is, and an IntelliJ window has many places for focus to sit: the editor, the Project tree, the terminal, the run console, the commit panel, a search popup. Only some of them take text. Click directly in the editor and look for the blinking caret on the line you want. Then run the one-character check: type a single letter. If it appears at the caret, dictation will land there too, so delete it and dictate. If nothing appears, or something else on screen reacts, the editor does not have focus.
Two things take focus without making it obvious:
- A dialog is open. Settings, Project Structure and many refactoring dialogs are modal, which means the editor behind them takes no input until they are closed. On a Mac with several displays or Spaces, the dialog can be sitting on a screen you are not looking at.
- A tool window was the last thing you clicked. Reading a stack trace in the Run window or selecting a file in the Project tree moves focus there. Pressing Escape in a tool window returns focus to the editor.
If the caret is in the editor and even a typed letter does not appear, the file is probably one that IntelliJ will not let you change. Go to fix 5. If a typed letter appears and dictated text from a dictation app does not, check the app's permissions in fix 10.
3. The Project tree jumps around, or a small search box appears
Trees and lists in IntelliJ have a feature called speed search. When focus is in the Project tool window, the Structure view or almost any other list, typing does not insert text anywhere. It filters the list. A small box appears showing what you typed, and the selection jumps to the first item that matches.
When dictated text arrives as typing while focus is in a tool window, you see that box fill with your sentence and the tree leap to some unrelated file. Nothing has been damaged and nothing was added to your code. Press Escape once to clear the search and again to return to the editor, click on the line you want, and dictate again. Apple's dictation often types nothing at all when no text field has focus, so this symptom is more common with tools that deliver their text as key presses, but the cure is the same.
4. Lines vanish or the caret jumps: Vim emulation
IdeaVim is a popular plugin that makes the editor behave like Vim. With it switched on, the editor starts in normal mode, where letters are commands and not text: d begins a delete, x removes a character, u undoes, and i switches to typing. Depending on how your dictated text is delivered, a sentence sent to an editor in normal mode can be carried out as a string of commands. Words do not appear. Lines disappear, the caret lands somewhere else in the file, and the undo history fills with changes you never asked for.
Press Command-Z until the file is back as it was. If you are not sure what changed, Local History in the File menu shows earlier versions of the file. Then press i before you dictate so that the editor is in insert mode, and press Escape when you have finished. The caret tells you which mode you are in: a block means normal mode, and a thin bar means insert mode. If you would rather keep Vim emulation out of the way while you write prose, the plugin adds a switch for turning itself on and off to the Tools menu and to the status bar.
5. The file will not take text
Sometimes the caret is exactly where you want it and IntelliJ still refuses input, from the keyboard and from dictation alike.
- Library sources and decompiled classes. If you navigated into a dependency, you are reading a file that belongs to a library. IntelliJ opens these read-only, and for a compiled class it shows a banner saying the file has been decompiled. Go back to your own code.
- Files outside the project. The first time you type in a file that is not part of the open project, IntelliJ shows a dialog asking whether you really mean to edit it. Until you answer, nothing is typed, and a dictated sentence is lost.
- Read-only files. A file can be read-only on disk or marked that way in the IDE. IntelliJ shows a padlock for it, and the File Properties item in the File menu has the option to make it writable.
- Rendered documentation comments. IntelliJ can show a documentation comment as formatted text in place of its source. In that state it is for reading only. Click the toggle beside it in the gutter to get the editable comment back. Reader mode, which IntelliJ applies to library and read-only files, shows comments this way by default.
- The wrong side of a diff. In a diff of your local changes, the pane showing the earlier version cannot be edited. Only the pane with your current version takes text.
- A preview. A Markdown file opens as an editor with a rendered preview beside it. The preview is not a text field. Click in the source side.
- A shared session. In a Code With Me session the host decides what guests can do. A guest with read-only access can follow along but cannot type.
6. Words are swapped for code, or a list keeps popping up
IntelliJ offers completions as you type. In code, a popup lists the classes, methods and variables that match the letters so far, and pressing Return or Tab inserts the highlighted one. Spoken prose that arrives in the middle of code looks like the start of many identifiers, so the popup opens and closes as the words stream in. If a line break arrives while it is open, the highlighted suggestion is inserted in place of your word.
The most reliable fix is to dictate only where prose belongs. Inside a comment, IntelliJ does not normally offer code completions as you type, so a sentence passes through untouched. Start the comment by hand, with two slashes or the block comment markers for your language, and then speak. Our guide on how to dictate code comments covers the habit in more detail.
If you dictate into string literals or other places where the popup does appear, you can stop it opening on its own. In Settings, open Editor, then General, then Code Completion, and untick Show suggestions as you type. Completion is still there when you ask for it with its shortcut. On the same page, check that the option to insert a suggestion when you press space, a dot or other keys is off, because with it on a completion can be accepted in the middle of a sentence.
Outside a comment or a string, the editor also closes brackets and quotes for you and re-indents lines, so an apostrophe or a bracket in a spoken sentence can arrive with a partner you did not say. Dictating actual syntax is rarely worth the trouble. Speak the explanation and type the code.
7. The comment turned red: line breaks
A line comment ends where the line ends. If you say "new line" at the end of a comment that starts with two slashes, or your dictation tool inserts a line break of its own, the text after the break is on a fresh line with no comment marker. IntelliJ reads it as code, underlines it in red, and the build fails on a sentence of English.
There are three ways round it.
- Keep each line comment to one line of speech. Dictate the sentence, then add the next comment marker yourself.
- Use a block or documentation comment for anything longer. Inside a block comment, text stays part of the comment across line breaks until the closing marker, and in a documentation comment IntelliJ continues the leading asterisks for you on each new line.
- Tidy up afterwards. A long dictated sentence arrives as one very long line. Put the caret in the comment and choose Fill Paragraph from the Edit menu to rewrap it to your project's line length, or turn on soft wraps so that long lines are at least visible while you work.
Documentation comments have a quirk of their own. When you type the opening marker of a documentation comment above a method and press Return, IntelliJ generates a stub with a line for each parameter. Dictate the description on the first line, then click into each parameter line in turn. If you speak straight through, the description of the second parameter ends up attached to the first.
8. The sentence appeared in several places, or with backslashes
IntelliJ can have more than one caret. Holding Option while you drag makes a column selection, Option-Shift-click adds a caret, and column selection mode puts a caret on every line you select. Whatever is typed is typed at all of them, so one dictated sentence appears on six lines at once. Extra carets are easy to create by accident when the mouse moves while a modifier key is held down. Press Escape to go back to a single caret, undo, and dictate again.
A different surprise comes from tools that deliver text by pasting it. IntelliJ handles pasted text with some care. It can re-indent it to match the surrounding code, and when the caret is inside a string literal it can escape characters such as quotation marks and backslashes so that the string stays valid. A dictated sentence with a quotation in it then arrives with backslashes in front of the quotes. That is correct for a string in code and wrong for prose. These behaviours are set under Settings, Editor, General, Smart Keys, where you will find the Reformat on paste option, with the language-specific options on the pages beneath it.
9. The words went to the terminal, a search box or the commit message
An IDE offers dictated text more places to land than almost any other app.
- The Terminal tool window. Text typed there goes to your shell, and a line break runs it. A spoken sentence becomes a command. Usually the shell just reports that it cannot find it, but that is not something to leave to chance. If the terminal is where you meant to dictate, our guide to Mac dictation not working in Terminal covers what to watch for.
- The Run or Debug console. While a program is running, its console accepts input and passes what is typed to the program. Once the program has stopped, the console is read-only.
- Search Everywhere, Find in Files and other popups. A sentence typed into a search popup is only a search, but a line break opens the top result, and you find yourself in a file you did not choose.
- The commit message field. This is often where you want to be, and dictation suits commit messages well. Two things to check: your sentence stays in the field until you click Commit, and IntelliJ may flag a long first line if the project's commit message inspections are switched on.
- An assistant's prompt box. If an AI chat tool window is open, its prompt box is a text field like any other. A prompt dictated there is usually sent when Return is pressed, so a spoken line break can send half a question.
- Another window. Dictation goes to the frontmost app. If a browser or a separate terminal came forward while you were reading documentation, the text went there.
Before a long dictation, glance at which part of the IDE has the blinking caret. A second spent looking saves a minute spent hunting for a lost paragraph.
10. Nothing works, anywhere
If the TextEdit test failed too, the problem is on the Mac, and IntelliJ is simply where you noticed it.
- Check that dictation is on, and which shortcut it uses. Open System Settings > Keyboard > Dictation, make sure Dictation is switched on, and read the Shortcut setting instead of assuming you know it. Confirm the language matches the one you speak.
- Check the input device. Open System Settings > Sound > Input, speak, and watch the level meter. If it does not move, your Mac is listening to the wrong microphone, such as a display, a dock or a virtual audio device left behind by a meeting app. Pick the right one.
- Check Bluetooth headsets. A headset can be connected and playing sound while its microphone is not active. Switch the input to the built-in microphone to test. Our guide to Mac dictation not working with AirPods covers this.
- Check a dictation app's permissions. A dictation app needs two permissions under System Settings > Privacy & Security: Microphone, so that it can hear you, and Accessibility, so that it can put text into other apps. After you grant one, quit the app and open it again.
- Clear any password prompt. While a password field is active, macOS limits what other apps can do with the keyboard, and dictation tools can stop responding. Development produces plenty of these moments: a Git credential dialog, a keychain prompt, a password manager window left open. Finish the prompt or cancel it. The Secure Keyboard Entry option in the Mac's own Terminal app has the same effect while it is switched on and Terminal is in front.
- Restart and update. Restart the Mac, then check for macOS updates and for an update to the IDE.
IntelliJ quirks that look like broken dictation
- A long comment stops halfway. Apple's dictation can end a session on its own when you pause, and explaining code involves plenty of pauses. What you said before the pause stays in the editor and the rest is lost. Our guide to Mac dictation stopping after 30 seconds explains why and what to do about it.
- Class and method names come out as ordinary words. Dictation writes what it hears, so a class called OrderRepository arrives as "order repository". Identifiers are the words dictation is least likely to have met. Our guides to why Mac dictation gets words wrong and to camelCase and snake_case by voice cover the causes and the workarounds.
- Words in your comment have wavy underlines. That is IntelliJ checking the spelling of your comment, not an error in the code. It is useful after dictation, because it points straight at the words that were misheard.
- The comment is one enormous line. Dictation does not wrap text. See fix 7.
- Text appears late, then catches up. While the IDE is busy, or in a remote development session where part of the IDE runs on another machine, typed text can lag. Wait for it to finish arriving before you click elsewhere.
- Commit summaries arrive with a capital letter and a full stop. Dictation writes sentences. If your team's convention says otherwise, tidy the summary by hand.
Quick triage
- Run Anything, Search Everywhere or a Copy dialog opens: your shortcut is one IntelliJ uses. Fix 1.
- Microphone shows, nothing is typed: the editor does not have focus, or a dialog is open. Fix 2.
- The Project tree jumps and a small box shows your words: speed search in a tool window. Fix 3.
- Lines vanish or the caret leaps: IdeaVim in normal mode. Fix 4.
- The caret is in the file, but it takes no text: read-only, a rendered comment, a preview or a diff. Fix 5.
- Words replaced by identifiers: code completion. Fix 6.
- The second half of a comment is red: a line break ended the comment. Fix 7.
- The sentence is on several lines, or has backslashes in it: extra carets, or paste handling. Fix 8.
- The text is in the terminal, a search popup or the commit field: focus was somewhere else. Fix 9.
- Fails in TextEdit as well: settings, input device or permissions. Fix 10.
What is worth dictating in an IDE
Most people speak at around 130 to 150 words per minute. The average adult types at about 40, and professional typists reach 80 to 100. None of that matters for a line of code, which is short, full of symbols and quicker to type with completion than to say. It matters for everything around the code: the comment that records why an odd-looking branch exists, the documentation for a public method, the commit message, the README, the note to a reviewer. That writing is the part that gets skipped when time is short, and for an average typist it is roughly three times quicker to say than to type.
Plain text and Markdown files are the easy case. In a README or a design note there is no completion popup to fight and no comment marker to keep track of, and the Markdown preview beside the editor shows the result as you go. If a description is going to be long, that is the best place in the IDE to say it.
For the writing itself, see our guide on how to dictate in IntelliJ IDEA and JetBrains IDEs. If you move between editors, the same kinds of problems turn up under different names, and we have guides to Mac dictation not working in VS Code and in Xcode.
One hotkey for every JetBrains IDE
Much of the trouble above comes from two things: a start gesture that IntelliJ is also listening for, and a session that ends when you stop to think. A dictation app that types at the cursor avoids both.
Voice Keyboard Pro is a Mac app that lives in the menu bar. Hold a hotkey, speak, release, and the text appears at your cursor, system-wide. Because it types wherever the cursor is, it works the same way in IntelliJ IDEA, PyCharm, WebStorm and the rest, and in the browser where you write the pull request afterwards. It still needs the caret in a place that can be edited, and the editor still applies its own rules to what arrives, so fixes 2 to 9 apply whichever tool you use.
Three things suit developers in particular:
- You hold a key instead of pressing one twice. Recording runs while you hold the hotkey. There is no double press for IntelliJ to react to, and a pause to work out the next sentence does not end the session. A long comment arrives as one piece of text.
- Smart Vocabulary. This is a personal dictionary with replacement rules. Add the class names, service names, framework names and acronyms your team uses, spelled and capitalised the way your codebase writes them, and Voice Keyboard Pro's transcription engine applies them every time.
- Meeting Mode. For the design reviews and stand-ups that turn into tickets afterwards, the Mac app has Meeting Mode with speaker detection and AI notes, and it can detect meetings from your calendar.
On privacy, our servers store only operational pings. No audio and no transcript content is stored, which matters when the comment you are dictating describes unreleased work. There is a free tier with daily limits, and Pro is $4.99 a month or $34.99 a year. On iPhone, Voice Keyboard Pro is a custom keyboard with a built-in mic button for dictation in any iOS app, which is handy for review comments and tickets when you are away from your desk.
Frequently asked questions
Does IntelliJ IDEA have its own dictation or voice typing?
No. There is no mic button in the editor. On a Mac you dictate with Apple's dictation or a dictation app, both of which type at the caret exactly as if you had typed the words.
Does IntelliJ need microphone permission for dictation?
No. Apple dictation is part of macOS, and a dictation app has its own microphone permission. If nothing is typed, the editor does not have focus, the file is read-only, or dictation is off in System Settings.
Why does Run Anything open when I try to dictate?
Your dictation shortcut is Control pressed twice, and IntelliJ uses the same gesture for Run Anything. Change the shortcut in System Settings, or tick Disable double modifier key shortcuts under Advanced Settings in IntelliJ.
Why did dictation delete lines of my code?
The IdeaVim plugin was in normal mode, where letters are commands. Undo the changes, press i to enter insert mode, and dictate again, or switch the plugin off while you write prose.
Can I dictate code in IntelliJ?
You can dictate anywhere the caret is, but it works best for prose: comments, documentation, commit messages and Markdown files. Symbols and identifiers are quicker to type with code completion than to say.
Do these fixes apply to PyCharm, WebStorm and Android Studio?
Yes. They are built on the same platform as IntelliJ IDEA, so the double-press shortcuts, speed search, code completion settings and IdeaVim plugin behave the same way.
What to do next
Run the TextEdit test, then match what you saw to a fix. For most people it is one of the first four: the shortcut was a double press that IntelliJ also uses, focus was in a tool window and not the editor, or IdeaVim was waiting in normal mode. If the words arrived and then went wrong, it is completion or a line break, in fixes 6 and 7. And if you want dictation that starts with a single hold and works the same way in every editor you use, try Voice Keyboard Pro's free tier on your next comment.
The words land at your cursor in whatever app you are already in — Mail, Slack, Word, a browser form. No dictation window, nothing to copy across.
Free forever for casual use · Apple Silicon & Intel