How do I disable the Search Everywhere shortcut? - intellij-idea

IntelliJ IDEA 13 has the new Search Anywhere feature. It sounds like it might be useful, but so far it just gets in the way. It's mapped to some kind of magical shift-based shortcut, and it comes up every time I try to shift-click to select text. When this happens, the pop-up flickers and gets into some stuck state, so the only way to get rid of it is to click in the editor pane, which of course loses the selection.
I call the shortcut "magical" because the Search Everywhere action appears in the Settings → Keymap list with no mapping, so I can't remove this mapping the usual way. Searching the dialog for search gives no relevant results.
How can I disable this buggy feature until it's ready for production use, and get back the ability to select text?

To disable the "Search everywhere" feature, you need to invoke "Go to action" (Ctrl+Shift+A), then type "Registry...".
Scroll down to "ide.suppress.double.click.handler" and check the box.
Source: https://youtrack.jetbrains.com/issue/IDEA-161094

After updating to build 133.331, I tried assigning a normal shortcut to it in Settings → Keymap, and that made it stop appearing on double-shift.

The settings for the new version have changed
Version: IDEA 2021.2.3
Preference > Advanced Settings
Scroll down to "User Interface", find "Disable double modifier key shortcuts" and check the box.

It's called Search Everywhere, and it's present in keymap.
For me it's perfectly disabled.
EDIT As I'v found it is hardcoded now, and will popup at doubleshift source
There is also an issue at jira, about this problem.
I hope it will be fixed soon.

from: https://youtrack.jetbrains.com/issue/IDEA-161094
In IDEA 2021.2:
You could enable the Settings (Preference on macOS) |
Advanced Settings | Disable double modifier key shortcuts option to
disable it.

This problem is still present under linux (ubuntu amd64 16.10 ) on Android Studio using X11Rdp for remote connection, maybe in other situations too - the Search Everywhere dialog appear on single Shift press.
The answer is here
https://youtrack.jetbrains.com/issue/IDEA-114933#comment=27-603899
Basically you need to
Open lib/resources.jar/idea/PlatformActions.xml and remove or comment such line:
<action id="SearchEverywhere" class="com.intellij.ide.actions.SearchEverywhereAction" />
and repack the jar.

Since end of 2017 you can add -Dide.suppress.double.click.handler=true to the custom VM options: cf. the answer from JetBrains.

Related

Disable copying entire line when nothing is selected in Intellij

I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before.
This is really annoying yet I cannot seem to figure out how to disable it. I am aware that there is a paste history you can use however this is not what I am after, I just want to disable it like you can do with sublime text.
Is there a way to disable this behaviour so that when I press ctrl+c and nothing is selected it just leaves the clipboard alone?
Since version 2021.2 there is a dedicated Don't copy/cut the current line when invoking the Copy or Cut action with no selection setting for this in Preferences | Advanced Settings on the Mac, Settings | Advanced Settings on other platforms.
For older IntelliJ Platform based IDE's the setting is more hidden:
Invoke Help | Find Action... (Ctrl (Cmd on Mac)+Shift+A), type Registry and select the Registry... item that appears. Enable the editor.skip.copy.and.cut.for.empty.selection option there. Be careful with the other configuration options, because it is possible to break your IntelliJ IDEA installation with an incorrect setting.
In Mac OS X:
Press cmd+shift+a.
Type registry and press return to
open the Registry.
Enable the editor.skip.copy.and.cut.for.empty.selection option.
Click Close.
I suppose it should be same as in WebStorm, or someone might be searching WebStorm solution as I did:
Open the settings: File > Settings > Advanced Settings (bottom of the list).
Start typing "editor".
Check the editor.skip.copy.and.cut.for.empty.selection
Click "OK" or "Apply"
On: WebStorm 2022.3.1
in PHPStorm -> From the Help menu, select Edit Custom Properties.
and paste
editor.skip.copy.and.cut.for.empty.selection = true

IntelliJ IDEA - Key board right click doesn't work

I am using IntelliJ IDEA Ultimate v 13.1, and I am fond of using key board short cuts, rarely use mouse. I am relatively new to this IDE as earlier I always worked on eclipse.
My question is about performing right click operations by pressing the right click key on key board (usually found near the right side Ctrl key on external key boards). The problem is when I press this key, nothing happens but when I click the mouse right click and things just happen. This is applicable on editor, project explorer and I guess everywhere in the IDE.
Is there a switch I should turn on and it will work or any other way to get key board right click work in IDEA? Thanks very much for your responses.
I know it is an old question, but it popped up as 1st result when I searched for my issue, and I figured it out with some of the context in Ketan#'s answer.
Fix:
Go to File -> Settings -> Keymap
Search for "Show Context Menu"
Add a new keyboard shortcut. When prompted, press the "right click" (aka "context menu") key.
For me, It simply works after just restart the IntelliJ IDE
Sometimes accidents just happen for good! This one falls in that category :)
Somehow IDEA was unable to load any of my projects, and I thought of deleting '.IntelliJIdea13' directory from my user directory. Initially I didn't change my keymap (shortcuts) to Eclipse and right click just works fine.
In any case the problem is there for IntelliJ to fix. They should allow right click from keyboard to work even when shortscuts are mapped to Eclipse style.
I tried to change the shortcuts to Eclipse and keyboard right click stopped working. When I change it to default, it starts working.
If you was installed it with jetbrains toolbox you can't made it easily.
I made a script written in php but you could adapt it to other languages:
https://gist.github.com/firegore2/0ba76d74f070b07eda5a12f3f24ba054

IntelliJ IDE (IDEA, PhpStorm, WebStorm): Shortcut for focusing Filter field in e.g. Change Log tool window

Is there a shortcut for focusing the Filter box in tool windows, specifically the Change Log?
See the attached screenshot to know which field I'm talking about. I searched the net and key map, but found nothing like that.
I have confirmed at Jetbrains that unfortunately it's not possible yet: http://devnet.jetbrains.com/message/5520523#5520523
Just start typing with the focus inside the tool window. IDEA invokes the search automatically. To select the item, press Enter. To cancel, press Esc.
This feature is called Tool Window Speed Search.

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 open files in Intellij-IDEA with double click?

My first day using this IDE...
is there a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.
You can change the KeyMap.
Go to File->Settings and find the keymap section.
You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.
However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.
There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.
It is easy way to do in windows.
I found a great solution to this problem by Jelmer Kuperus over at Orange11.
Create an .Xresources file in your home directory. Add the following line:
*multiClickTime: 400
Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:
xrdb ~/.Xresources
The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.
I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV
Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.