IntelliJ shortcut and keyboard layout - intellij-idea

I recently acquired an HP Spectre 13 on which I installed GNU/Linux (Arch Linux). I then installed IntelliJ. Everything seemed fine until I tried the shortcut.
I'm on an AZERTY keyboard. I configured the system layout so that I can enjoy the right layout, i.e when I type the letter "a", I've got an "a", and so on. However, with IntelliJ, when typing text, the recognized keyboard layout is "azerty", but using shortcuts, IntelliJ recognizes a "qwerty" layout.
Example: To select all the text, we do ^A. But instead, I get a ^Q, though the letter "a" is recognized as an "a" when I code.
I'm clueless on this one, since for instance ^A works fine in my web browser. I doubt it may come from the hardware, but who knows.
PS: Whether it's IntelliJ 13 or 14, the problem is the same.

Alternatively, make the azerty keyboard layout first in order in system settings.
Source link.
And BTW, guess what, the problem still persists in 2020. ๐Ÿ˜
UPDATE: As of September 2020 there is a new checkbox to solve this:
(Settings -> Keymap -> Use National layouts for shortcuts)

For me, IntelliJ was using a different keyboard layout on Debian Jessie.
Force IntelliJ to use the French KB layout:
setxkbmap fr
https://wiki.debian.org/Keyboard

I finally found a solution by forcing the keyboard layout with the "setxkb" utility.
setxkb fr
It seems that doing it through my Desktop Environment (Cinammon) only solves it partially. It was also buggy.
So I decided to move to something more basic such as awesome and bspwm, where things doesn't come magically since you have to configure everything yourself.

Related

Can't type in IntelliJ

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
Turn off Vim Emulator from Tools in the IntelliJ, like this picture:
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!
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
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.
Closed IDEA, all IDEA projects! Even though in other IDEA windows I could type.
Removed .idea folder in the project I could not edit.
Restarted IDEA.
Then I was able to type!
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
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.
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.
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.
It seems to be because another window has the cursor and is not giving it back.
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...
Go to the most recently opened IntelliJ instance
Check if the cursor has become stuck in that project's terminal window, or another window
no? check all other open IntelliJ instances
For me it happened because of vim
Om Mac, I solved it by navigating to File โ†’ Reload All from Disk.
Keyboard shortcut: โŒฅ โŒ˜ Y
IntelliJ IDEA 2020.1.4
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.

Intellij 14 weird editor/cursor behaviour

I just upgraded my Intellij IDEA to version 14, but I have the problem that my cursor in the editor window is acting "different". It starts of in a sort of protected mode, which looks like the insert mode but it isn't, where I can't insert anything. After pressing some keys like a it changes back to normal except that sometimes it goes in a selection mode and by that I mean if I hit backspace instead of deleting the character as expected it just selects/highlights it. I find this behavior really annoying and I hope one of you can help me.
Additional Information:
Mac OS X 10.10 Yosemite Intellij 14.0
Please ask if i can provide any additional information which might be helpful.
Disabling/Uninstalling the ideaVim plugin seemed to fix the problem for me. The plugin description hints that you can configure it via a configuration script in ~/.ideavimrc, which there may also be options to get "normal" behavior with the plugin installed but I haven't looked into that though because the plugin doesn't seems all that useful to me.
Disable Vim Emulator for Intellij.
On the top menu, go to Tools > Vim Emulator
ideaVim plug in is the problem, disable that and that misbehaviour will be gone.
Mac OS X Yosemite / IntelliJ IDEA 14 CE / us keyboard layout /
If your cursor looks like this:
Go to tools:
Turn off Vim Emulator:
Cursor should go back to normal.
Settings > IDE Settings > Editor > Appearance > Disable Use block caret
This fixed the issue for me.
It seems you have entered into insert mode. I have mac and I entered some combination of keys which somehow enabled insert mode. The use block caret was not ticked for me. I found this mentioned on JetBrains thread to get out of insert mode
In short, press on mac to get back into editing mode with the normal cursor
โŒฅ + โŒ˜ + v
Go to the Keymap section of your preferences and add your keyboard shortcut to the Toggle Insert/Override command.

Intellij ignores the selected keyboard layout

This seems like a bug in IntelliJ 12: Every couple of times when I switch between keyboard layouts (English and Hebrew) IntelliJ get stuck on one of them and ignore the windows selected keyboard layout. This happens only for intelliJ, all other programs respond as usual to the windows selected keyboard layout.
Is there at least a workaround, or a way to reset IntelliJ's keyboard layout? The only thing that seems to work for me so far is restarting my machine...
(My OS is Windows 7 Enterprise 64bit)
This is 100% reproduced when you switch keyboard layout in quick class search (Ctrl+N). Also in intellij idea 13.
Something like:
Open quick search menu when keyboard is not in English layout (Russian e.g.)
Type anything
Switch to English
Congratulations! you stuck in russian layout :) restart your intellij idea!
When I ceased to switch layout in search, I forgot about this problem.
UPD: it's suitable for most part of text inputs (even for search and file creation)
I've just had this problem on PyCharm 2020.2.3
Here's how I've solved it:
Go to Settings -> Keymap
At the bottom of the window, check the option Use national layouts for shortcuts (require restart)
That did the trick
restarting IntelliJ also works.
I wonder how they managed to get such a stupid bug, this is not an easy bug to write, especially in Java.
That was found to be more like a global Microsoft/Oracle bug. Simple workaround from IntelliJ's issue tracker: use Windows' language parameters to assign a hotkey (Ctrl + number) for changing the layout directly to a desired language. This suddenly will affect both Windows And IDEA. It's said that bug was fixed in Win8. A bit more info: here
In 2020 bug is still relevant in the most IDEs based on IntelliJ. For example I observe this in PyCharm now.
There is workaround for Windows:
Go to Language Bar - Settings... - Advanced Key Settings
Set key sequence of To English action to Ctrl + 1
Set key sequence of to other your language to Ctrl + 2
Apply
Go to IntelliJ/PyCharm and switch language by new sequences
After that bug disappears and you can switch language by traditional method
For me the following actions seem to resolve the issue:
Go to Control Panel
Select Clock, Language & Region
Press Region
In the opened window choose English for Format.
Also all my settings except the location are set to English (locale, default keyboard etc.)
This fix worked on my mac, access Preferences -> Editor -> Typing Corrector from the intellij IDEA menu. If you are able to navigate to the same window on your OS, you can try this.
Uncheck Enable keyboard layout correction in the Typing Corrector window
I got the same issue in Ubuntu 16.04. Restarting IDEA doesn't change anything. But Changing the default layout to be the one I want by default ensured ubuntu work well with it.
Go to the search textfield above file editor.
Switch layout.
Type smth.
Click somwhere in the file editor.
Write smth with swithed layout.

How to fix IntelliJ Idea not closing tabs by Ctrl+F4?

I happen to use IntelliJ Idea 10.5.2 with Scala and SBT plugins to code in Scala on an XUbuntu 11.10 system with Oracle JDK 7.
And I can't close editor tabs with Ctrl+F4 (while right-clicking on a tab shows this shortcut for closing).
Any ideas about the reason probable and a way to fix?
Looks like xfce uses Ctrl+F4 as global shortcut that gets captured before it's propagated to IntelliJ. See this page for how to change shortcuts.
Alternatively you can also change the keybindings in IntelliJ. Use 'File|Settings' and got to 'Keymap' in the settings window. The 'close' action is bound to Ctrl+F4
Adding a new answer to this old question as duckduckgo brought me here. This shortcut can be edited quite easily on any version of Xfce (4) which has the Settings Editor app (tested on XUbuntu 18.04).
Launch Settings editor, and on the left column (channel) select xfce4-keyboard-shortcuts. Now on the right find any entry with the value <Primary>F? (primary means ctrl). Some entries can be deleted by pressing the reset button (the ones under xfwm4->custom). While you are at it, you might want to remove all the <Alt>F? bindings too (except Alt+F4).
The entries under xfwm4->default cannot be deleted, but the trick here is to edit the entry and remove any value.
I've read that this was editable in previous versions, but the value was in a text file somewhere (just sharing this in case anyone is using an older version of Xfce).
If you are using a Dell laptop where the F4 keys is used to 'mute' the sound. Muting the sound with the F4 key will disable the F4 key.
Try to unmute, function key 'fn'+F4 to unmute (lamp is not lit on key).
Then you can use CTRL+F4.

Changing keyboard layout on application focus

As everybody knows the en-US Keyboard-layout is the best one for programming. So I'd like to use it in my IDEs. But since I live in a non-en-US country I need the de-CH layout for all other applications. Now I wonder if it is possible to set the layout depending to which application currently has the focus. If that is possible, can a human brain adapt to such a behaviour or is it just confusing?
cheers,
AC
The operating system is Windows 7 and the IDEs are VisualStudio and Netbeans
i thought about the same question some time ago, haven't fount an easy solution and so i changed the layout of may PC (where i do mostly programming) to en-US and left my Laptop on de-DE (i'm from germany) - after almost a week i changed back my PC to de-DE because i was confused ll the time...
you should probably mention your operating system and ides. afaik there's an option to make the keyboard layout application specific โ€“ so you set it once after starting up your ide, and when you switch windows the layout is also changed.
nevertheless, have a look at ergonomic/optimized layouts (like neo ;)
There is an option in both Windows and Linux to use a US layout with additional international characters. For instance, typing an รค will be yielded by pressing RAlt+q. The good thing about this is that it's the same combination for Windows and Linux.
I think you can configure it easily with built-in Windows settings.
In "Control Panel" - "Clock, language and Region" - "Language", you can enable "Enable different input methods for each application window" (the translation is approximated because I am using Spanish OS). I think that suffices.
I created my own customized keyboard layout with Microsoft Keyboard Layout Creator (MSKLC)
I used my current keyboard as base and modified only a few keys in order not to always twist my right thumb when I want to get curling bracktes {}
It works very well in combination with a short-cut for switching the keyboard layout. You can define such shortcut in your system language settings.