Bug 409335

Summary: Alt+letter keystrokes doesn't work in global menu for some non-KDE apps
Product: [Plasma] plasmashell Reporter: Félicien Pillot <felicien.pillot>
Component: Global Menu widgetAssignee: Kai Uwe Broulik <kde>
Status: CONFIRMED ---    
Severity: normal CC: kde.podagric, kdedev, mvourlakos, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.16.1   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: menus appear at the top left corner of the main window

Description Félicien Pillot 2019-06-30 17:09:00 UTC
Created attachment 121235 [details]
menus appear at the top left corner of the main window

I am seeing some strange —and repeatable— behaviors with the global menu widget in the top panel, various depending on the focused application.

STEP TO REPRODUCE
0. Open Gimp (2.10.12)
1. Type alt+f or alt+<any letter corresponding to a menu entry>.
2. Do the same for LibreOffice (6.2.4)

OBSERVED RESULT
For Gimp: menus appear at the top left corner of the main window, instead of being under the corresponding item (see attachment)
For LibreOffice: menus doesn't appear when using keystrokes.

EXPECTED RESULT
They appear the same way as in the other KDE applications: under the corresponding item from the top bar, when pressing the keystroke.

=== SOFTWARE/OS VERSIONS ===
Distribution: Parabola
Linux version: lts 4.14.85
KDE Plasma Version: 5.16.1
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4
Comment 1 Christoph Feck 2019-06-30 23:16:54 UTC
> as in the other KDE applications

Neither GIMP nor LibreOffice are KDE applications.
Comment 2 ratijas 2022-09-21 00:52:28 UTC
Can confirm.

For example, in Sublime Text which is GTK-based on Linux, pressing shortcuts like Alt+F opens a GTK menu right below the tabbar. Clearly, Sublime Text handles them on its own. Mnemonic accelerators displayed in a Global Menu applet and the ones actually registered in app just happen to coincide sometimes, but what you see underscored may not be what would actually be invoked.

Even some first-class KDE applications won't integrate with the Global Menu very well. For instance, Konsole sends all the Alt+letter shortcuts as special escape-sequences to the active session.

Global Menu definitely lacks understanding which shortcuts are already taken/registered in app. Not sure that it is solvable in general case, but we should give it a shot. Maybe some standardization effort wouldn't hurt.
Comment 3 TraceyC 2024-09-25 17:36:18 UTC
I no longer see the issue with Libre Office in git-master, menu shortcuts bring up the appropriate menu from the global menu widget
I do still see the reported issue with Gimp