Weird IntelliJ keyboard lock issues

Answered

I've been having persistent keyboard lock issues with IntelliJ. There are 2 different types.

First is if I do some mouse action coupled with holding down shift. E.g. ctrl-click to navigate to a definition or mouse-drag to select and then copy via ctrl-c. After that, non-alphabetical keys don't work anymore (like delete, arrow keys, space, modifier keys). To unlock, I spam the ctrl key. Very frustrating when selecting and copying and finding out the copy didn't actually work. I've had this issue for many years already

With the second keyboard lock, the entire keyboard locks and spamming ctrl doesn't do anything. To unlock, I right click with the mouse and things are back to normal again after. This issue popped up maybe a year ago.

IntellJ is installed on Debian-based Linux, no Vim plugin. Has anyone seen these issues before?

IntelliJ IDEA 2019.2.4 (Ultimate Edition)
Build #IU-192.7142.36, built on October 28, 2019
Licensed to ***

Runtime version: 11.0.4+10-b304.77 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.2.17-1rodete3-amd64
GC: ParNew, ConcurrentMarkSweep
Memory: 8916M
Cores: 12
Registry: dart.server.additional.arguments=--port=10003 --instrumentation-log-file=../das_log.txt, actionSystem.keyGestures.enabled=true, ide.index.image.max.size=0, caches.indexerThreadsCount=24, dart.projects.without.pubspec=true
Non-Bundled Plugins: com.thoughtworks.gauge, BashSupport, com.hasintech.intellij.angularTemplates, Dart

 

0
20 comments
Avatar
Permanently deleted user

I haven't tried the newest version, but these issues have been plaguing me for several versions already, at least dating back until the 2017 releases. I will post idea.log once I encounter the issue again.

0
Avatar
Permanently deleted user

> With the second keyboard lock, the entire keyboard locks and spamming ctrl doesn't do anything. To unlock, I right click with the mouse and things are back to normal again after

Most likely this is a problem with focus. Next time it happens, please, follow this instruction and then file a new issue.

Regarding the first problem, try switching boot JDK to OpenJDK 11, please. See the manual on how to switch.

0
Avatar
Permanently deleted user

I tried mapping the dump focus to a hotkey, but when the lock occurred, the hotkey didn't work. After right clicking, the hotkey worked as expected. I didn't see anything weird on the logs, but will check again if it reoccurs.

0
Avatar
Permanently deleted user

What desktop environment do you have?

0
Avatar
Permanently deleted user

Linux version:

PRETTY_NAME="Debian GNU/Linux rodete"
NAME="Debian GNU/Linux"
ID=debian

Desktop:

XFCE4 currently, but also ran into this issue on Cinnamon

0
Avatar
Permanently deleted user

There aren't any known issues that match the problem. What do you do when the focus lost happens? Do you invoke any actions? Do you switch windows?

0
Avatar
Permanently deleted user

Same happens to me, since 2019.3 (I think). Keyboard locks, and application must be restarted. Can not exactly put my finger on what causes it to freeze. Mate of mine has the same problem and he blames his keyboard (for no reason).

IDEA 2020.1 / Ubuntu 20.04 LTS / Gnome 3.36.1

2
Avatar
Permanently deleted user

Try recommendations from this issue:

  1. Go to "Help | Edit Custom VM options..." and add -Drecreate.x11.input.method=true to a new line
  2. Restart IDE
1
Avatar
Permanently deleted user

It's been a week without any weird lock-outs, so looks like it helped, thanks!

0
Avatar
Permanently deleted user

Many thanks! That fixed my CTRL key lock out! Any idea why this happens?

I still get complete focus lock-out from time to time, looks like it is related to the little notification popups that appear at the bottom. I can live with that.

0
Avatar
Permanently deleted user

> Any idea why this happens?

Previously there was a similar issue in mutter (it was fixed in 3.34.1). I filed a new one on behalf of the latest reports: https://gitlab.gnome.org/GNOME/mutter/-/issues/1315

0

This still occurs even in version PS-211.7442.50. Adding `add -Drecreate.x11.input.method=true` hasn't made any difference as far as I can see.

One other thing that also tend to occur at the same time is that the 2nd button on the mouse (right click) does not fire at all as long as this is manifesting.

`=== About ===
Build version: PhpStorm 2021.1.3 Build #PS-211.7442.50 June 2, 2021
Java version: 11.0.11+9-b1341.57amd64
Operating System: Linux (5.4.0-74-generic, amd64) (Ubuntu 20.04.2 LTS focal)
JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o.

=== System ===
Number of CPU: 8
Used memory: 733Mb
Free memory: 1131Mb
Total memory: 1864Mb
Maximum available memory: 4029Mb

`

 

0

Marius Cucuruz, does the `-Dawt.ime.disabled=true` option help?

If so, then please upvote the IDEA-245960, attach complete IDE logs to it (you can make the files visible only to the JetBrains Team) and specify the exact name and version of your desktop manager. Thank you!

0

Sunflowerstarfishmail if you cannot use some keys after exiting IntelliJ, then it should be some OS issue because our apps don't change anything systemwide. Please try searching a solution or asking on the community forums (e.g. askubuntu).

0

Sunflowerstarfishmail does the issue persist if you disable the iBus completely?

If it does then please provide the output of

set | grep -E 'XMODIFIERS|GTK_IM_MODULE|QT_IM_MODULE';setxkbmap -query
0

Sunflowerstarfishmail still seems to be a hardware problem (based on the fact the corresponding keys do not work in BIOS and in another OS).

Are you on x11 or Wayland? Check this with

echo $XDG_SESSION_TYPE

If it's x11, please try checking if those problematic keys are recognized with xev.

If you have a chance to check with another external USB keyboard, please try and let us know how it goes.

0

Can you confirm that these are the keys locked by Intellij ? 

I'm pretty sure that our IDEs do not block anything on the OS (or hardware) level. Any settings we suggest - or any known keyboard issues - affect only the IDE behavior. And in most cases restarting IntelliJ or applying some known workaround (like switching to another app and back or adding VM options) returns things back to normal. 

0

It is possible that some keys did not respond during the code checking (not sure what process exactly is meant here), but I could not find any similar reports. If you have filed an issue for this, please point me in the right direction. And anyway, even if there were any performance issues leading to the stuck keyboard in the IDE, this should not affect the whole OS so that even xev does not report anything.

Could you check the problematic keys with the showkey (as described e.g. here)?

 

0

Thank you very much. From what I see there are several possible reasons:

1. Old plugins installed together with your IDE. Solution: check and update the corresponding ones.

2. VIM emulation turned on. In the current IDE version this should only be possible if you have the Idea Vim plugin installed. If so, could you try disabling it? Even better would be to disable all the third-party plugins temporarily (File | Settings | Plugins | ⚙ | Disable All Downloaded Plugins, restart IDE) and see if the issue happens again.

3. Broken / missing keymap used. Please try switching to some default keymap (e.g. unmodified GNOME) in Settings | Keymap.

4. Old ibus version running somewhere in your OS. Discussed in IDEA-78860, see the solution suggested in the issue description.

If nothing of the above helps, please file a new issue in our tracker and provide the following details:

1. What actions exactly lead to the keys being locked?

2. What helps to get them working again?

3. Does the issue persist if you disable all the third-party plugins?

4. Please attach complete IDE logs after you face the issue again.

Thank you for your time and effort.

0

Please sign in to leave a comment.