PhpStorm "grabs" Alt key too easily, moving focus / control to menu bar?

PhpStorm is great, money well spent, however one minor issue has been bugging me.  It seems the IDE "grabs" the Alt key too easily. What I mean is that if I use the Alt key in any combination in the editor, or even when I Alt-Tab to it, the Menu Bar often gets focus, as it would if the Alt key was pressed and released alone.

For example, if I hit Alt+1, the Project window should open and become focused. I expect to be able to use the arrow keys to navigate the files, hit Enter to open something, etc. However, very often after hitting Alt+1, focus goes to the Menu Bar (the "File" menu is outlined). I have to hit ESC to revert control to wherever I was.

All-in-all this sounds minor, but I end up hitting ESC hundreds of times per day, and it interrupts my flow, as I often hit an Alt key combo and start to do something only to realize the Tool Bar is focused (i.e. "Why can't I type?!?"). This is very evident when I Alt-Tab to my web browser to do something, then Alt-Tab back to the IDE....I expect the focus to be where I was, usually somewhere in a file, but it's often at the Tool Bar.

I fully expect this to be just a quirk (maybe with Java Swing?) I'll learn to live with, but since it makes me slightly mental, thought I'd at least ask here and see if anyone else notices this or if there's a solution.

cheers,
Max

p.s. just so I don't sound completely crazy, this definitely is something I've only noticed with PhpStorm. I'm comparing this to Alt key usage in other programs and it just doesn't happen like it does with PhpStorm.

1
4 comments

Hi there,

Yes, I have witnessed that as well.

Alt-Tab .... Menu Bar

Not on Windows 7 (at least I have not noticed it), but on Windows XP -- very annoying (I'm not using it any longer, so don't know the current status).

For example, if I hit Alt+1, the Project window should open and become focused. I expect to be able to use the arrow keys to navigate the files, hit Enter to open something, etc. However, very often after hitting Alt+1, focus goes to the Menu Bar (the "File" menu is outlined). I have to hit ESC to revert control to wherever I was.

Confirm that. Thankfully for me I'm not using such shortcuts often (rather using mouse for such operations) so it does not affect me that much.

I fully expect this to be just a quirk (maybe with Java Swing?)

Quite possible.

Try this -- press Alt few times (e.g. 4 times) -- IDE will do 1 cycle, while in normal Windows applications it will do 2 cycles.

Normal behaviour (2 cycles):

  1. Menu bar is activated/focused
  2. Menu bar is deactivated (focus back to where it was before)
  3. Menu bar is activated/focused
  4. Menu bar is deactivated (focus back to where it was before)


PhpStorm cycle:

  1. Menu bar is activated/focused
  2. Menu bar is deactivated (focus back to where it was before)
  3. Cursor changed its shape and focus is unknown (apparently window system menu is focused but not activated -- the menu which you get when clicking on window icon or right click on window title)
  4. Focus is back and cursor is back to previous shape



There are few tickets about such (or similar) behaviour -- but devs do not seem to rush fixing it (if bothering with it at all) -- check for them on Issue Tracker (and submit new ticket if specific one is not found): http://youtrack.jetbrains.net/dashboard/IDEA

0
Alt-Tab .... Menu Bar

Not on Windows 7 (at least I have not noticed it), but on Windows XP -- very annoying (I'm not using it any longer, so don't know the current status).


I probably should have mentioned that:  I get the Alt-Tab problem on Windows 7 64-bit.

Try this -- press Alt few times (e.g. 4 times)  [...]


PhpStorm cycle:

  1. Menu bar is activated/focused
  2. Menu bar is deactivated (focus back to where it was before)
  3. Cursor changed its shape and focus is unknown (apparently window system menu is focused but not activated -- the menu which you get when clicking on window icon or right click on window title)
  4. Focus is back and cursor is back to previous shape


Nice find. I never noticed this, but I'm seeing the same behavior. And definitely think that third press is somehow focusing the window menu, because if you press Space afterward, it'll bring that menu up.

I'll check the bugtracker.  Thanks!
0
Avatar
Vladimir Luchansky
0

Having this problem now on 2023 version trying to sue the alt+\ shortcut and it opens th emenu instead of executing the github copilot shortcut.

1

Please sign in to leave a comment.