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

25

83

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.

Presbyopia answered 3/5, 2012 at 11:30 Comment(5)
On Montain Lion, and with latest IDEA (12.1.2) and still happens to me 2-3 times per week...Karyolymph
There seems to be a new bug open at JetBrains that's relevant to this.Karyolymph
Here is a workaround to this issueBathyal
It happening in 2018.1.4 version in mac Mojave.Iliac
https://mcmap.net/q/241137/-weird-keyboard-locks-in-intellij-idea-delete-amp-arrow-keys-etc solved it for me - none of the others hereErnst
S
9

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.

Submissive answered 3/5, 2012 at 12:12 Comment(10)
Yes, I see this in the log, and it's also still in v11.1.2. I haven't tried the latest EAP though yet.Presbyopia
This is a recurring annoying thing which resists for years. The solution is presented in another answer. Simply type on the shell: ibus-daemon -rdSteffens
@RichardGomes this ibus bug was fixed years ago, make sure you have the version with the fix: youtrack.jetbrains.com/issue/…Submissive
@Submissive : I'm running the latest and greatest IntelliJ at this point in time: 2019.3. The issue persists.Steffens
@RichardGomes the issue is not in IntelliJ IDEA, but in ibus, please read the linked comment.Submissive
@CrazyCoder: I use Linux 100% of time since 2004, various distributions. I've never observed such behavior using any other application. It only happens with IntelliJ. Whatever your opinion is or my opinion is, the solution is simple (after you know it!): ibus-daemon -rd . The correct solution is not looking at an issue management system which is not going to help you. The correct solution for this questions is typing ibus-daemon -rdSteffens
@RichardGomes What ibus version do you have? It's probably still not updated and doesn't have the fix for the issue. It's not IntelliJ IDEA specific, will affect all Java Swing apps. It's not the solution, it's a hack/workaround. The solution is to either uninstall ibus or use ibus version which has the fix.Submissive
I'm running the latest, greatest, rock solid Debian Buster 10.2 which works just fine with all other applications.Steffens
@RichardGomes many distributions still didn't include the ibus fix for this issue. You may want to contact your distro package managers for help.Submissive
@Submissive : The issue management system asks for ibus 1.5.11. All *ibus* packages I have report version 1.5.19. To be fair, it's a long time I do not observe this issue once again. However, it happened to me once again just minutes ago after I pasted some code into a Scala worksheet.Steffens
B
70

This answer on superuser.com worked for me:

ibus-daemon -rd
Bevvy answered 3/9, 2014 at 14:38 Comment(5)
This worked for me. However it set the keyboard layout to US. I used the following to set the keyboard to UK (you will need to change this to whatever your keyboard is): ibus-daemon -rd sleep 0.25 setxkbmap gb Not sure why a delay is required, but without it the keyboard remains mapped to USDesdemona
Using fish-shell ibus-daemon -rd; and sleep 0.25; and setxkbmap gb did the trick for me on Ubuntu 14.04Katzman
This break my ISO international layout keyboard as well, after doing this I cant make any accent. Were in 2020 , is there a way to fix this efficently?Poisonous
@DimitriKopriwa Honestly, I dont have this problem anymore since years and I wonder everytime when this gets upvoted that this problem still exists for some people. I guess this only happens on some old versions of system/intellij/libs/kernel/...?Bevvy
I still have the issue and I have a opensource project official license and the latest version of intellij, this is not fixed.Poisonous
B
59

Just turn off Vim Emulator from Tools like this picture:

enter image description here

Burchfield answered 6/4, 2017 at 1:8 Comment(2)
The weird situation I was in, in case it helps someone: I didn't even have the Ideavim plugin installed (so couldn't see this option under Tools). I had to install the Ideavim plugin in order to disable it...Claudiaclaudian
Thanks saved a lot of rework!Rasberry
R
17

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.

Release answered 6/4, 2015 at 20:30 Comment(1)
No worries, I've just figured it out. There's an option under Tools call Vim Emulator, uncheck this and it will fix the issue.Stope
S
9

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.

Submissive answered 3/5, 2012 at 12:12 Comment(10)
Yes, I see this in the log, and it's also still in v11.1.2. I haven't tried the latest EAP though yet.Presbyopia
This is a recurring annoying thing which resists for years. The solution is presented in another answer. Simply type on the shell: ibus-daemon -rdSteffens
@RichardGomes this ibus bug was fixed years ago, make sure you have the version with the fix: youtrack.jetbrains.com/issue/…Submissive
@Submissive : I'm running the latest and greatest IntelliJ at this point in time: 2019.3. The issue persists.Steffens
@RichardGomes the issue is not in IntelliJ IDEA, but in ibus, please read the linked comment.Submissive
@CrazyCoder: I use Linux 100% of time since 2004, various distributions. I've never observed such behavior using any other application. It only happens with IntelliJ. Whatever your opinion is or my opinion is, the solution is simple (after you know it!): ibus-daemon -rd . The correct solution is not looking at an issue management system which is not going to help you. The correct solution for this questions is typing ibus-daemon -rdSteffens
@RichardGomes What ibus version do you have? It's probably still not updated and doesn't have the fix for the issue. It's not IntelliJ IDEA specific, will affect all Java Swing apps. It's not the solution, it's a hack/workaround. The solution is to either uninstall ibus or use ibus version which has the fix.Submissive
I'm running the latest, greatest, rock solid Debian Buster 10.2 which works just fine with all other applications.Steffens
@RichardGomes many distributions still didn't include the ibus fix for this issue. You may want to contact your distro package managers for help.Submissive
@Submissive : The issue management system asks for ibus 1.5.11. All *ibus* packages I have report version 1.5.19. To be fair, it's a long time I do not observe this issue once again. However, it happened to me once again just minutes ago after I pasted some code into a Scala worksheet.Steffens
S
6

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.

Suppliant answered 21/8, 2015 at 23:30 Comment(0)
T
5

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.

Tradescantia answered 18/10, 2014 at 16:49 Comment(0)
S
4

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!
Sangria answered 2/7, 2012 at 22:57 Comment(3)
I'm on 11.1.2 meanwhile and as far as I remember, it seems to have gotten better, can't really recall whether I had this issue since the update, but might be worth to update if you haven't. Which IDEA version are you using?Presbyopia
(However, the mentioned bug youtrack.jetbrains.com/issue/IDEA-80181 below doesn't seem to be fixed with 11.1.2 either, still some problems, but I haven't checked the EAP as of Jun 22 yet).Presbyopia
I had the same issue in 12.0.2 on Windows 7, also no "inconsistency" in the log file. I tried changing my Keymap settings, and once I set them back to "Default" everything worked again.Tomasatomasina
I
3

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

Inimical answered 19/1, 2014 at 17:27 Comment(0)
S
2

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

Shropshire answered 18/2, 2016 at 21:7 Comment(0)
K
2

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

Keely answered 18/10, 2016 at 3:34 Comment(0)
I
1

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

Preferences -> Terminal -> Check "Override IDE shortcuts"
Ina answered 28/10, 2017 at 20:54 Comment(0)
J
1

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.

Jiles answered 10/10, 2019 at 15:27 Comment(0)
A
1

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.

Arcturus answered 24/2, 2020 at 20:16 Comment(0)
S
1

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
Simonize answered 16/6, 2020 at 14:48 Comment(0)
C
0

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

Chomp answered 1/9, 2016 at 9:31 Comment(0)
H
0

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

Hallucinogen answered 2/8, 2019 at 21:38 Comment(0)
J
0

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.

Josphinejoss answered 15/9, 2019 at 17:41 Comment(0)
E
0
  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
Ernst answered 28/2, 2020 at 18:55 Comment(0)
D
0

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

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

Dolora answered 9/1, 2022 at 12:32 Comment(0)
T
0

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

Trichina answered 12/5, 2022 at 8:53 Comment(0)
S
0

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!

Sensitometer answered 10/3, 2023 at 10:12 Comment(0)
A
0

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.

Arroyo answered 29/10, 2023 at 15:22 Comment(1)
Turned out IdeaVim v2.6.0, v2.6.1 are broken, updating to v2.6.3 fixes the issue and no need to uninstall Python plugin.Arroyo
R
0

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

Rosenblum answered 28/1, 2024 at 5:34 Comment(1)
I had the issue on IntelliJ version 2023.3.3Rosenblum
N
0

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.

Natiha answered 13/5, 2024 at 13:57 Comment(0)
O
-1

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

Omsk answered 25/6, 2020 at 18:59 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.