[BUG] Keyboard gets locked or inactive on IntelliJ IDEA on MacOS
Answered
I have faced this issue twice this week. (no vim plugin installed).
The keyboard suddenly stops working (both external and macbook pro). The mouse stays active and I can copy, paste, mark code and move it etc..
I have never noticed any circumstance that could lead to this but it was very annoying because I had to restart IntelliJ.
IntelliJ IDEA 2018.1.5 (Ultimate Edition)
Build #IU-181.5281.24, built on June 12, 2018
JRE: 1.8.0_152-release-1136-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
Macbook Pro i7 3,5GHz, 16GB Ram
Please sign in to leave a comment.
Please provide full IDE log folder zipped.
Do you have multiply projects opened?
Please try if it helps as a workaround to disable Editor tabs (set placement to 'None' in Preferences | Editor | General | Editor Tabs settings).
You also could try 2018.2 preview from https://www.jetbrains.com/idea/nextversion.
Hi there!
I can reliably reproduce this behavior by pressing a letter key (I tried "m" and "s" keys) for 2 or 3 secs while the focus is on the editor. There is no error logged or thread freeze dump created, which I could attach.
Changing the editor tabs placement to 'none' doesn't change anything. The only way to proceed typing it to restart IntelliJ. Colleagues of mine cannot reproduce the bug this way. Hope this helps anyway.
IntelliJ IDEA 2018.1.1 (Ultimate Edition)
Build #IU-181.4445.78, built on April 9, 2018
JRE: 1.8.0_152-release-1136-b27 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.3
May be related to https://youtrack.jetbrains.com/issue/IDEA-189643. Do you launch Run Configurations? Do you have multiply IDE windows opened? Could you provide all logs zipped? Thanks.
Hi, this fix worked for me:
The issue I had was related to how OSX renders the accent selection menu bar when you press and hold certain keys. I'm not sure why it locks up, but if you disable that feature by entering the following in terminal, the keyboard input will stop freezing. You have to restart your IDE as well.
defaults write -g ApplePressAndHoldEnabled -bool false
Same for me : on MacOS, after holding a key to enter a special caracter I cannot enter any text anywhere (editor or any text field).
MacOS Mojave
Webstorm 2018.2.5
Java 10.0.2
Hi. This problem should be fixed in a next JRE:
https://youtrack.jetbrains.com/issue/JRE-998
Hold the special key again to make the keyboard work again.
Hello,
I have the same issue but i cannot figure out a way to reproduce it constantly. Sometimes it happen with multiple IDE instance open (working on multiple projecs), sometimes it happen when i open Paste panel (clipboard history macosx tool). The solution for me is to close all the instance (if multiple open) and restart. Once, but only once, i had to restart my mac since i couldnt make it to work again.
macOS 10.14.2 (18C54)
kernel: Darwin 18.2.0
iMac16,2
PhpStorm 2018.3.3
Build #PS-183.5153.36, built on January 9, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2
Same problem ...
Do you use any software that may interact with the keyboard?
No, sometimes after X hours, RubyMine is blocked. When is blocked i have a file: "java_error_in_rubymine.hprof"
For WebStorm no problem, only on RubyMine.
macOS 10.14.2 (18C54)
Boris,
Is it possible to share idea.log ("Help | Show Log in...") from both IDEs after restarting?
I think this happens on Mac because of Apple's press and hold accents menu which allows for making accented characters. If you don't use the accented characters much, the workaround which works for me is to turn off the accented characters menu altogether using the CLI command:
defaults write -g ApplePressAndHoldEnabled -bool false
Note: You have to logout and login to make this take effect.
Hi Yaroslav Bedrov,
RubyMine: https://pastebin.com/C135iDhL
Boris,
Do you use "press and hold" keyboard feature? Is mouse also blocked?
Yaroslav,
1- i just tried to disable "press and hold", i still have to reboot tho, will keep you updated if that changes something
2- mouse isn't blocked
Yes mouse is also blocked
Diego, Please follow the related issue: https://youtrack.jetbrains.com/issue/IDEA-152818
Boris, Looks like you have different problem. Could you please check the issue with 2019.1 EAP: https://www.jetbrains.com/ruby/nextversion/ ? If the issue still occurs please report new issue on YouTrack attaching logs folder zipped: http://youtrack.jetbrains.com/issues/IDEA.
Hi,
I restarted my laptop, had not rebooted for a long time. Since then everything is fine except when I use a dual screen, if I RubyMine is on the 2nd screen and I disconnect the HDMI, RubyMine returns to my initial screen and there at this point RubyMine is blocked.
Boris,
Could you please report new issue attaching logs folder zipped: http://youtrack.jetbrains.com/issues/JRE ?
Yaroslav,
I've read the issue on that ticket and indeed seems similar to what happens to me. Anyways, disabling "press and hold" and rebooting didn't fix it for me. It just happened again, next time it will happen i'll try what the other issue suggest (alt+tabbing).
Is there anything i can do to help you dig it down?
Diego,
Thanks for the information! Currently we're investigating the issue. We'll try to fix it as soon as possible.
Yaroslav,
It happened again and alt+tabbing didn't solve it for me. I tried switching to different apps and go back to PhpStorm but nothing happened. The only way i've got is to close the project (i don't need to fully close the app)
Is everybody here reproducing the issue only on multi-monitor setups? I'm on a 1-portrait, 1-landscape monitor setup, on Mojave. I've seen the issue happen on both Idea as well as Android Studio - typically running on my portrait monitor, so that I can read more lines-of-code at a time.
High Sierra, 1 extenal monitor. It might have happened at least 5 times so far.
WebStorm version is 2018.3.3
If you have multiple projects open with some CLI tools running it won't be "just fine" workaround.
I can use all alphanumeric keys but I can't use Enter, Backspace, Arrow Keys etc
Update: I just did some trial and errors. Managed to make it work again by closing some terminal tabs instead of closing all WS projects.
@Cihad Turhan could you please check if the issue reproduce on 2019.1 EAP?
This happened to me today, looks like I accidentally long pressed a key. After trying to figure out what key it was by long pressing random keys which by the way cause a special character keyboard to display with numbers under them. I long pressed the letter 'p' and the keyboard started to work again.
Decarlo,
This issue is presented on different operating systems: https://youtrack.jetbrains.com/issue/IDEA-206614
Am I getting right that you are on macOS? Could you try to run "defaults write -g ApplePressAndHoldEnabled -bool false" in terminal and restart IDE?
With the latest version of PhpStorm i no longer had this issue. Looks like fixed, at least for me :)
I can confirm this still happens in IntelliJ when long pressing a key with an accent. To get keyboard functionality again, I have to long press almost any other key that doesn't have an accent.