Bug 420980 - Keyboard navigation faulty in app menu decoration integration
Summary: Keyboard navigation faulty in app menu decoration integration
Alias: None
Product: kwin
Classification: Plasma
Component: appmenu (show other bugs)
Version: 5.18.4
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
Depends on:
Reported: 2020-05-04 04:25 UTC by Shriramana Sharma
Modified: 2021-05-12 12:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.22


Note You need to log in before you can comment on or make changes to this bug.
Description Shriramana Sharma 2020-05-04 04:25:56 UTC
I'm using KWin from Kubuntu Focal. This is the first time I'm getting exposed to the integration of the App Menu into the decoration since I'm upgrading directly from Bionic. I have not installed any global menu widget.

I find that the keyboard navigation for the app menu is seriously faulty. I give examples using the simple basic app Kate.

1) If I open the App Menu by clicking on the decoration button using the mouse, I am able to use Up/Down to navigate among File, Edit etc. I am also able to use Right to enter a submenu.

2) If I once enter one of these submenus from the above step, or if I directly do Alt+F etc to go to these submenus, I can similarly navigate Up/Down or enter further submenus. For instance, in File, I can go under Open Recent.

3) However I cannot go back to a parent menu/submenu at any stage by using Left.

   a) If I try to do that from a sub-sub-menu like Open Recent, the whole menu is exited and the focus goes back to the application wherever it was.

   b) If I try to do that from within a top-level sub-menu like File, I am brought back to the top-level menu but unable to use Up/Down to navigate between File, Edit etc as before. Even Esc doesn't enable one to exit the menu. It is effectively frozen for normal navigation.

   c) Surprisingly, pressing Alt+Tab or Alt+BackTab at this point enables one to navigate instead. If once we press either of these two then normal navigation of Up/Down or Esc is restored.

At all points of time, mouse navigation of the menu/submenus works fine AFAICS, but this doesn't help people like me who are devoted to the keyboard.

For now I'm switching off the in-decoration app menu due this serious usability problem. Doing so also doesn't seem to awaken all apps immediately to restore their regular menu bars, but that's a separate problem.

I hope this can be fixed.

Linux/KDE Plasma: Kubuntu Focal
(available in About System)
KDE Plasma Version:
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Comment 1 Bug Janitor Service 2021-05-04 07:18:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/839
Comment 2 David Redondo 2021-05-12 10:20:09 UTC
Git commit f8dcf69718f0d1e85632b4500994b4812621a88b by David Redondo.
Committed on 12/05/2021 at 10:19.
Pushed by davidre into branch 'master'.

Drop input grabbing hack

Apparently this was introduced to prevent the window losing focus if
https://bugs.kde.org/show_bug.cgi?id=310476 is to be believed. However
on X the window does not lose focus without it.
Furthermore it actually improves keyboard navigation on X, which after a
child menu was closed stopped working.
On Wayland this prevents things working at all.

M  +0    -37   appmenu/verticalmenu.cpp
M  +0    -7    appmenu/verticalmenu.h