34

I'm using IntelliJ IDEA on my Mac to work on a project, and I keep on coming across an issue where I can't type. Occasionally when I switch to another application and then switch back to IntelliJ I can't type anything, and the cursor doesn't appear on text when I click on things. Does anyone know what causes this? After 1-2 minutes it goes back to normal, but it's started happening more frequently and it's pretty frustrating to not be able to type and have no way to fix it.

This is the version of IntelliJ I'm using:

IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
annedroiid
  • 6,267
  • 11
  • 31
  • 54
  • 1
    which OS do you use? – JimHawkins Jun 21 '16 at 05:31
  • 1
    Try all the usual stuff.... invalidate caches... restart intellij... check for rogue plugins... download the latest version (maybe even ultimate version)... bump up memory quota... – vikingsteve Jun 21 '16 at 07:05
  • Possible duplicate of [Weird keyboard locks in IntelliJ IDEA (delete & arrow keys, etc.)](https://stackoverflow.com/questions/10430467/weird-keyboard-locks-in-intellij-idea-delete-arrow-keys-etc) – Jithin Pavithran Jun 27 '17 at 09:54
  • https://stackoverflow.com/a/60454591/1058292 - this solved it for me, none of the others below – atreeon Feb 28 '20 at 18:54

13 Answers13

77

Turn off Vim Emulator from Tools in the IntelliJ, like this picture:

Screenshot

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Nirav Patel
  • 1,297
  • 1
  • 12
  • 23
21

I am encountering this issue aswell, ...

MAC os Mojave 10.14.2, Inteliij Community 2018.3.5

Aside from restarting / clearing caches, I found that cmd + leftShift + F still opens the search window, and all my keystrokes appeared in the searchbox!

After the searchshortcut, I was able to close the searchbox and work again!

Buttery
  • 318
  • 2
  • 6
  • 1
    This works. I noticed that on pressing (cmd + leftShift + F) the search window popped into focus then closed itself - implying that it was somehow already open but hidden/unfocusable. Perhaps this explains the observed behaviour - the hidden search window was capturing keystrokes until closed. – Moob Apr 28 '21 at 08:58
  • 1
    cmd + leftShift + F made it for me, thanks! – vanR Apr 26 '22 at 09:40
5

The answer here helped me https://intellij-support.jetbrains.com/hc/en-us/community/posts/206152119-Can-t-type-in-editor-window

Quoting the author of the answer:

I had the same problem. It goes away after I click the icon at top of the scroll bar. it happens frequently on windows 7/10, and occasionally on mac. my colleagues said they have experienced it too

DraggonZ
  • 1,057
  • 1
  • 16
  • 22
5
  1. Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
  2. Removed .idea folder in the project I could not edit.
  3. Restarted IDEA.

Then I was able to type!

Ahmed Nabil
  • 17,392
  • 11
  • 61
  • 88
Yan Khonski
  • 12,225
  • 15
  • 76
  • 114
5

Have the same issue occasionally, can't type in any Intellij windows. My temporary/quick fix, is to:

  • Close any terminal windows in intellij
  • Use cmd+shift+f to pull up the search window.

Seems to fix it, for a while.

mlo55
  • 6,663
  • 6
  • 33
  • 26
4

Maybe you entered Vim emulator as said. Maybe only by mistake :).

Control-V is a frequently used shortcut. And Control-Alt_V is the shortcut to enable Vim mode so you can see the problem...

How to know in five seconds: type a ":" (colon) and if the cursor jump to end of the screen, that is vim. If so enter q to quit and then Control-Alt-V (on windows) to go back to IDEA standard mode.

vi is a powerful text editor since ever. But only if you pretend and know how to use it... There is even a warning on the IDEA install saying like "do not install unless you are familiar with Vim" in yellow bold text, iirc.

[Follows historic data, that you may find boring off-topic or interesting]

Today's editors opens the code in edit mode right away so you can start typing over existing code. Vim by the other hand opens the code in, let us say, browsing mode: there is a set of navigation keys to browse the code. Everything you type is supposed to be a command. When you want to edit you enter INSERT mode and then you can type new text. Only then.

Just for more historic data: vi navigation mode is great for studying code you do not know, using IDEA, since it does not change the text unless you tell it to, and some vi commands are clever.

One example:

"/" (forward slash) is one search command, and "z" is a smart scroll command so that:

/setCellFactory will search for the next match of "setCellFactory" and put the cursor there

Then if you type "z" the code will be positioned so that line is the first on screen. And if you type "." the line will be at the middle. And if you type "-" that line will be at the last position at the screen. And you can use these commands again and again. And new slash will go for the next match, like F3

This "z" thing is a feature I miss in Visual Studio, IDEA, Eclipse, Word, WordPad: these commands to scroll text AROUND a pattern... /pattern, z, z., z-. The alternative is the mouse wheel...

I am used to vi since the 80's and is the editor I still use today on Linux terminals so when this happened to me on IDEA I was lucky to remember and suspect of that on the first time.

Sorry if these details are boring

arfneto
  • 1,227
  • 1
  • 6
  • 13
  • 1
    This is a bug that happens for devs who are familiar with vim and use vim on a daily basis as well. Running "ibus-daemon -rd" fixes the issue as per this ticket - https://youtrack.jetbrains.com/issue/IDEA-240368#focus=streamItem-27-4138070.0-0 – livinston Jun 25 '20 at 05:13
1

Ensure you haven't unintentionally enabled vim emulation. Go to IntelliJ Idea -> Preferences and select Plugins. Scroll down and look for the vim emulation plugin and if it's checked, then either uncheck it or uninstall it completely.

Rick Miller
  • 21
  • 1
  • 3
1

Ran into same issue with intelliJ 2017.1.2, but no VIM Plugin. However, I had just created an empty project with some .groovy files. I could edit the files in the groovy project, but not java projects.

Only way I could fix java projects, was blow-away workspace.xml files in each, then I could edit again. However, had to re-create tomcat configs, breakpoints, other IDE settings. etc.

Eric Manley
  • 1,049
  • 10
  • 8
1

I had a problem with entering characters when working with .story files. When I tried to type in any character, it appeared for a short while and immediately disappeared. The cause of the problem was jbehave plugin I was using. After uninstalling it and restarting IntelliJ everything was fine.

padrian92
  • 147
  • 4
  • 16
0

It seems to be because another window has the cursor and is not giving it back.

  1. Check any open floated windows, click on them & then click back to your intellij instance

alternatively, if you have multiple intellij instances open the cursor could be there...

  1. Go to the most recently opened IntelliJ instance
  2. Check if the cursor has become stuck in that project's terminal window, or another window
  3. no? check all other open IntelliJ instances
atreeon
  • 21,799
  • 13
  • 85
  • 104
0

For me it happened because of vim

subhashis
  • 4,629
  • 8
  • 37
  • 52
0

Om Mac, I solved it by navigating to FileReload All from Disk.

Keyboard shortcut: Y

IntelliJ IDEA 2020.1.4

IntelliJ IDEA 2020.1.4

Raktim Biswas
  • 4,011
  • 5
  • 27
  • 32
0

Try disabling plugins one at a time. It was the "BashSupport Pro" plugin that caused it for me. Disabled it and I could type again right away. I read other comments saying some other plugins caused the issue as well.

Michael Peterson
  • 10,383
  • 3
  • 54
  • 51