23

When working with IntelliJ on a JavaProject it shows to use alt + enter to import a class for example, but this isnt working anymore.

It worked in the past, but something must have changed,
-the shortcut is still set,
-other shortcut would work
- i cant assign alt+enter manually, although if i reset it to default it gets set to it,

any ideas how to fix my problem?
btw my keyboard layout is german, but i dont think it is the problem because it worked in the past, my os is win 7.

edited: when i am working within the IDE and i e.g. write
Arrays.toString(a);
and didn't import "java.util.Arrays" yet, the IDE says:

" ? java.util.Arrays? Alt+Eingabe"    (Eingabe = Enter in German)

so when i assign a different shortcut it works, but with Alt+Enter it doesnt

thanks in advance for any help.

Gotti92
  • 742
  • 1
  • 6
  • 22
  • 1
    Please check if http://stackoverflow.com/a/43319356/104891 is the case. – CrazyCoder Apr 28 '17 at 15:16
  • sadly thats not the case, if u have any other suggestions i'd be happy – Gotti92 Apr 28 '17 at 15:47
  • 1
    Power Save Mode enabled in File menu? – CrazyCoder Apr 28 '17 at 15:48
  • if i enable the power save mode the suggestion, isnt even shown, so that's not the case either, thanks for the answer – Gotti92 Apr 28 '17 at 15:50
  • 5
    So, the issue is with the keyboard shortcuts? Maybe Alt+Enter is already used by some other application or OS? See also https://youtrack.jetbrains.com/issue/IDEA-165950#comment=27-2053321 and check if IDE recognizes Alt+Enter when you try to add a new shortcut. – CrazyCoder Apr 28 '17 at 15:51
  • When i try to assign Alt+Enter as a shortcut i am not able to, although i can assign e.g. Alt+D to it – Gotti92 Apr 28 '17 at 15:55
  • 2
    Well, it means IDE doesn't see the shortcut for some reason. Probably it's already used by some other application or the operating system. – CrazyCoder Apr 28 '17 at 15:56
  • I still have this problem with CLion 2018.2.5 on Windows 10. It shows a suggestion and a shortcut `Alt+Enter` below it as a hint. Usually it works, but sometimes when I press the combination, nothing happens. **I just restart my CLion and it works again.** I am working with C++ though. – Snackoverflow Oct 21 '18 at 11:47
  • in my last answer in this post i mentioned answer is left Alt+Enter https://stackoverflow.com/a/62413320/308578 – saber tabatabaee yazdi Dec 21 '20 at 15:05

9 Answers9

30

"Well, it means IDE doesn't see the shortcut for some reason. Probably it's already used by some other application or the operating system. – CrazyCoder 25 mins ago "

i closed all applications and it turns out that, Facebook GameRoom, running in the background, somehow is the reason the shortcut doesn't work, i have no idea why, but thats the solution

many thanks to CrazyCoder

Gotti92
  • 742
  • 1
  • 6
  • 22
9

It was working earlier but it stopped working due to unknown reason,

One workaround is Try fn+Alt+Enter

ketankk
  • 2,578
  • 1
  • 29
  • 27
5

I had the same problem
and it turned out to be the keyboard language in Windows, It wasn't english,
so just make sure you are on English

Danny Mor
  • 1,143
  • 12
  • 12
  • 2
    Looks like some languages override Right Alt behavior, at least in case of Lithuanian Left Alt is working fine with Lithuanian enabled, Right does not, when switch to English, everything is fine again. Was pulling hair to figure out why out of nowhere it stops working, thanks. – Giedrius Aug 30 '19 at 07:50
3

My problem solved. just try :

alt enter php storm intellij problem not working

LEFT Alt + Enter

LEFT Alt+Enter

Looks like some languages override Right Alt behavior, at least in case of Lithuanian Left Alt is working fine with Lithuanian enabled, Right does not, when switch to English, everything is fine again. Was pulling hair to figure out why out of nowhere it stops working, thanks

saber tabatabaee yazdi
  • 4,404
  • 3
  • 42
  • 58
2

On my side, culprit is some VPN software called PulseSecure

fn + Alt+Enter+Shift worked for me (credits @ketankk).

J. Chomel
  • 8,193
  • 15
  • 41
  • 69
1

In my case hint is showing Alt + Shift + Enter, but Ctrl+Shift+Enter works for some reason oO

Anton
  • 516
  • 1
  • 6
  • 22
1

I have the same issue. Alt+Insert not working while I was trying to generate getters/setters for my POJO class. I just added another shortcut for that "Generate" operation. If you are using Intellij Idea, you can do that by following steps:

  1. Go to File -> Settings -> Keymap.
  2. On the search bar appeared, search for "Generate", you will find an entry to which assigned shortcut will be Alt+Insert.
  3. Right click on this entry and select 'Add Keyboard shorcut'.
  4. Now, type your own shortcut that you want. In my case, I used Ctrl+Shift+G.

It worked fine and now I am using my new shortcut for Generate operation.

  • Alt+Insert, e.g. Alt+einfg on a german language keyboard did the trick. So the shortcut description in the menu of IntelliJ does not show right. – user8504816 Jun 30 '23 at 09:21
0

In my case, I mapped Alt+Enter to a system shortcut (for expanding the current window) and I forgot. So it might not be another program, but your past self-sabotaging you.

JoseHdez_2
  • 4,040
  • 6
  • 27
  • 44
0

I had the same problem while upgrading to a new IDE version. The cause was a plugin error in new IDE version, I resolved disabling/updating that plugin.

Marco Luly
  • 333
  • 4
  • 8