← Back to Blog

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.

Free to start Dictate into any app on your Mac or iPhone — hold a key, speak, release. Download for MaciPhone

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.

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.

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:

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.

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.

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.

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.

IntelliJ quirks that look like broken dictation

Quick triage

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:

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.

Voice Keyboard Pro
Hold your key · Speak · Release

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