Mathias Conradt
Mathias Conradt

Reputation: 28665

Weird keyboard locks in IntelliJ IDEA (delete & arrow keys, etc.)

While working in IntelliJ IDEA, the keyboard occasionally locks in a way that delete or < > ^ keys don't work properly anymore, in a way that delete doesn't do anything anymore, and the arrow keys scroll the entire source code / editor section.

I don't know if I am accidentially some kind of shortcut, but the only way I can get it back to normal again is closing and re-opening the IDE, which is annoying of course.

I'm on Mac OS X Lion, latest IntelliJ IDEA CE (11.1.1), but also had it before with the previous versions.

Upvotes: 83

Views: 62927

Answers (25)

Olivier Faucheux
Olivier Faucheux

Reputation: 2606

I had such a problem using AssertJ with the method pressKey() instead of pressAndReleaseKeys(). Pressing the key did not stop with the test nor by calling Robot.cleanUp(): it was keeping holding the key down inside of intellij itself.

Upvotes: 0

Maryam Talebi
Maryam Talebi

Reputation: 39

For me it was SonarLint plugin. disabling it fixed it.

Upvotes: 0

Jimmy Lu
Jimmy Lu

Reputation: 398

I got exactly the same issue recently after an update and restart of my IntelliJ. In my case, the log showed jupyterCommandModeEnterKeyHandler: Could not satisfy sorting requirements and it's something conflicted with IdeaVim plugin. After uninstalling and re-installing all suspicious plugins, I found Python plugin was the reason (make sense as the error message stated). So uninstalling it is the only way I can do to fix the problem.

Upvotes: 0

Shivanshu Nanda
Shivanshu Nanda

Reputation: 1

For me using Mac M1 it worked by adding VM option

-Dcom.jetbrains.use.old.keyevent.processing=true in the idea.vmoptions file.

Go to Help -> Click on "Edit Custom VM Options" It will ask permission to create idea.vmoptions if not created before.

Add the -Dcom.jetbrains.use.old.keyevent.processing=true . Save and restart! Voila! Back to coding!

Upvotes: 0

Cavor Kehl
Cavor Kehl

Reputation: 46

In my case, switching to a different file causes the problem. I found that right clicking on the editor resolves the problem temporally. Clicking on a different window(inside IDEA) then clicking back to the editor solves the problem too.

I am using 2021.1.3 UE on Windows 10

Upvotes: 0

Victor Majri
Victor Majri

Reputation: 1

You can simply: Reset all keymaps to default or windows:

File > Settings > Keymap > "Change first input to preferred keymap default"

Upvotes: 0

user13780764
user13780764

Reputation:

The easiest way to fix this is to disable your VIM Emulator which you will find in the bottom right corner in your in.IDEA. That should do it

Upvotes: -1

freak0
freak0

Reputation: 93

Workaround for unresponsive keyboard on Ubuntu 20.04

From : https://youtrack.jetbrains.com/issue/IDEA-23472

  1. Go to IDE "Help | Edit Custom VM options..."
  2. Add -Drecreate.x11.input.method=true to a new line
  3. Restart IDE

Upvotes: 1

atreeon
atreeon

Reputation: 24107

  1. Go to the most recently opened IntelliJ instance
  2. Check if the cursor has become stuck in that project's terminal window
  3. no? check all other open IntelliJ instances

Upvotes: 0

user12380441
user12380441

Reputation:

I had the same problem before. First, you need to check if there is a 'VIM emulator'. If so, try disabling it, that should suffice. If the problem persists, try contacting the support in the help section on the menu bar.

Upvotes: 1

Syed Muhammad Sajjad
Syed Muhammad Sajjad

Reputation: 174

Ran into this same issue on Windows 10. You can try closing the IDE from the Task Manager manually. Do this when the IntelliJ is not operational i.e. when IntelliJ Idea is starting, but the screen is not open yet.

Upvotes: 1

Rostyslav Druzhchenko
Rostyslav Druzhchenko

Reputation: 3773

In my case, it was something different. I got this weird behaviour after I entered my licence credentials to Idea. I suppose it created a new Jet Brains user's account for me with an ability to sync IDE settings enabled by default. My suggestion that it has overridden my setting (including keyboard bindings) with some default ones created by Jet Brains.

Fortunately, I had previously set up my Settings Repository on Github. I rolled back to my old settings pressing File -> Settings Repository -> Override Local.

The issue was on macOS in Database editor.

Upvotes: 0

nrapopor
nrapopor

Reputation: 723

Ubuntu 18.04.02
Idea (Ultimate) 2019.2

Had the same problem. Keyboard all of a sudden stopped recognizing arrow keys and backspace. Non of the solutions above would work.
What did work -- was switching the Boot SDK back to the old trusty Oracle 1.8 (I was running on JB 9).

How-To:

  • Help->Find Action
    search for JDK. select Switch Boot JDK and pick an 8 or an 11 version of java. restart

  • If you do not have a local 8 or 11 java JDK installed. I only had the issue with 9, both 8 and 11 work fine.
    search for action SDK, select "Get JB SDK from Bintray" and pick the latest available 11 or 8 as you prefer ...

Good Luck,
Nick

Upvotes: 0

Piotr Korlaga
Piotr Korlaga

Reputation: 3468

In my case backspace didn't work but only in terminal. I fixed it by going

Preferences -> Terminal -> Check "Override IDE shortcuts"

Upvotes: 1

alwe
alwe

Reputation: 1497

This answer on superuser.com worked for me:

ibus-daemon -rd

Upvotes: 70

Ali.Ghodrat
Ali.Ghodrat

Reputation: 3704

Just turn off Vim Emulator from Tools like this picture:

enter image description here

Upvotes: 60

Aliti
Aliti

Reputation: 2095

I had the same issue when upgrading to IntelliJ 14.1.4. If you have the IdeaVim plug-in installed, try disabling it. That worked for me. Reference

Upvotes: 2

albanx
albanx

Reputation: 6335

Same problem for me today. My solution was to unplug and plugin the usb keyboard on my MacBook. Hope it helps.

Upvotes: 0

Nicolas Zozol
Nicolas Zozol

Reputation: 7038

If you do ibus restart, you'll get a qwerty keyboard. For french users, you can do :

ibus restart; sleep 1; ibus engine xkb:fr::fra 

I suppose you can change fr::fra by ru or us:dvorak:eng

Upvotes: 2

TG Gowda
TG Gowda

Reputation: 11937

I faced same issue,

Environment:

IDEA 14.1.4 on Ubuntu Gnome 15.04

Solution :

I work with default keymaps, but some reason default keymap was not working. Hence I removed 'IdeaVim' plugin and restarted the IDE, everything works fine now. File > Settings > Plugins and look for the plugins.

Upvotes: 6

Sophia Feng
Sophia Feng

Reputation: 1003

I am new to IntelliJ, and had the same problem of deleting by delete. But I just realised that IntelliJ is actually mimicing the keys in Vim.

For example, when some text is highlighted, pressing d deletes the text, pressing y copies (yanks) it, pressing p pastes (puts) it, and pressing i enters the editting (insert) mode.

For navigation, Ctrl+f navigates to the next screen, Ctrl+b navigates to the previous screen, and Shift+g navigates to the end of the file.

All are same as in Vim.

Upvotes: 17

Saeed Zarinfam
Saeed Zarinfam

Reputation: 10180

There is a an open issue in jetbrains youtrack for intellij idea that recommend two solutions:

  1. Keyboard input may be unlocked by restarting IBus daemon ("ibus-daemon -rd" from a console).
  2. IBus can be disabled for IDEA by unsetting env. variable XMODIFIERS (e.g. "XMODIFIERS= idea.sh"), but ability to input national characters in IDEA will be lost.

I have used the second one and fixed my problem.

Upvotes: 5

jsears
jsears

Reputation: 4641

You may need to update your plugins. They can cause strange behavior if they are out of date.

http://www.jetbrains.com/idea/webhelp/installing-updating-and-uninstalling-repository-plugins.html

Upvotes: 3

Tom Dibble
Tom Dibble

Reputation: 167

I have the same issue periodically, which is a pain because IntelliJ takes so long to load in the first place, then I need to close it and start all over again!

I don't have "PSI" anywhere in my IntelliJ logs. I'll be sending my logs off to IntelliJ; hopefully they can fix this ASAP as it is a major time waster!

Other things I've tried:

  • Changing the current keymap - arrow keys don't work in any keymaps
  • Closing and reopening just the project - issue persists until IntelliJ itself is closed and reopened.
  • Trying other keys - It seems like Ctrl and Command are completely ignored by the IDE once it gets in this state. Of course, all the text entry keys still work, so you can type, just can't change cursor position using anything but the mouse and menu bar. In a pinch, one could work like this for a short period of time, but that would entail a significant masochist streak!

Upvotes: 4

CrazyCoder
CrazyCoder

Reputation: 402005

Check idea.log (Help | Reveal Log in ...) for exceptions. If you see PSI/document inconsistency before reparse there, then you are probably affected by this bug.

If there are other exceptions not related to this bug, please send the log to JetBrains technical support.

Upvotes: 9

Related Questions