Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: App's menu opens when I change keyboard layout with Alt+Shift #2420

Closed
ngseer opened this issue Apr 11, 2017 · 8 comments
Closed

Bug: App's menu opens when I change keyboard layout with Alt+Shift #2420

ngseer opened this issue Apr 11, 2017 · 8 comments

Comments

@ngseer
Copy link

ngseer commented Apr 11, 2017

Hello.

When I hit Alt+Shift to change my keyboard layout, app's menu opens so I can't type anything until I close it. It's really annoying.

Also I did some research and found that it seems to be a common problem for electron-based apps.
The thing is when you have some high-level menu labels without "underscored" letters (these ones that allow you to activate menu item by hittimg alt+underscored_letter), they will be activated when you hit Alt+Shift.
I don't know if it's a bug or just a feature but probable workaround is to edit menu labels' definitions in this way: label: 'File' -> label: '&File'. It will add an 'underscore' to letter F and therefore prevent this menu item from being activated by hitting Alt+Shift.

GPMDP 4.2.0
Linux x64 4.6.4-1-ARCH
KDE Plasma 5.9.4

@MarshallOfSound
Copy link
Owner

Currently Alt+Space is by design both on the apps part and on the OS's. If you want to change it to have menu specific hotkeys (&File) then I would accept a PR to do so

@ngseer
Copy link
Author

ngseer commented Apr 11, 2017

Not sure if I understood you correctly.

When I hit Alt+Space, track pauses and that's OK with me.
The problem is, when I hit Alt+Shift (in order to change my keyboard layout, that's a common hotkey in different OS'es and DE's) app's menu opens and tells me that I shall not pass until I close it.

Here's a common scenario: I want to find some cool artist so I put a cursor in a search bar.
But sometimes I'm getting tired from good ol' Гражданская Оборона and go for something completely different with Latin letters in it's name.
So I hit Alt+Shift in order to switch from Cyrillic to Latin layout and app menu opens (I never asked for this). Therefore, in order to continue my quest I should close menu manually because it won't let me to perform any search.
It's clearly a misbehaving.

Actually, I don't care about menu hotkeys, I just proposed a possible workaround.
Also I'd prefer that a single app wouldn't force me to change a global hotkey.

@ngseer ngseer changed the title Bug: App's menu opens when I change keyboard layout by Alt+Shift Bug: App's menu opens when I change keyboard layout with Alt+Shift Apr 11, 2017
@rndev15
Copy link

rndev15 commented Mar 14, 2019

Same bug in XFCE. It's very popular bug in electron apps, for example:
https://github.com/meetfranz/franz/issues/1088
https://github.com/zulip/zulip-electron/issues/528
RocketChat/Rocket.Chat.Electron#50
element-hq/element-web#4345

And there is a very easy to fix:
meetfranz/franz#1323

@MarshallOfSound can I submit a PR?

@jostrander
Copy link
Collaborator

Feel free to PR @romkaspb

@rndev15
Copy link

rndev15 commented Mar 20, 2019

I'm really confused, the solution I've described is working in multiple electron apps and not working in Google Play Music Unofficial.
@jostrander may be we can investigate it together?
I'm only changing src/main/features/core/applicationMenu.js, and only adding & to each label (i. e. 'Edit' -> '&Edit').
Then, I'm running the following commands:

$ npm run build
$ npm start

And problem still reaching.
It's working at most electron apps, why it's not working here?
Are you using Electron on steroids? :)
May be a reason of it's behaviour that I already have installed this app from deb package to my ubuntu?

It seems that Atom had the same bug (https://github.com/atom/atom/blob/master/menus/linux.cson),
but atom guys solved it in very strange way. They have added & to random place of label (of course not random, but I did not reached the logic).

@jostrander
Copy link
Collaborator

I'm on Ubuntu 18.04.2 with Gnome and I can't reproduce this, however I only have the en_US keyboard layout enabled. I can bring the menu bar up by using Alt alone but unfortunately Alt+Shift has no effect.

On another note, the & usually precedes the character you would hit to shortcut to that menu item, for example if you were trying to navigate the menus:
image

You would use &Edit, &View, &Playback, &Window, and &Help to allow you to navigate using Alt+E, etc.

I would try to uninstall the dpkg variant if you are running the development version, just as a precaution.

@rndev15
Copy link

rndev15 commented Mar 21, 2019

As I know this bug is not confirming on Gnome.
It's 100% confirmed on XFCE and in around a 50% confirmed on KDE.

@ngseer
Copy link
Author

ngseer commented Mar 21, 2019

I can confirm that KDE is still affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants