Project

General

Profile

Actions

Bug #13791

open

WApplication::globalKeyWentDown dead as long as WMenu focused by mouse click

Added by Michael Seibt 12 days ago. Updated 6 days ago.

Status:
New
Priority:
High
Assignee:
-
Target version:
-
Start date:
06/19/2025
Due date:
% Done:

0%

Estimated time:

Description

We are porting a desktop application, which must be fully accessible using the keyboard.
Affected: WApplication::globalKeyWentDown of Wt 4.11.4
We have created a main menu using WMenu and added dropdown menus (WPopupMenu) using addMenu(const WString& text, std::unique_ptr<WMenu> menu).
After clicking menu items, key presses are not signaled.
After closing a dropdown by clicking again, key presses are still not signaled.
It needs a click to a "normal" widget, to receive keypresses again.

Fundamentally, menu items must be selectable using arrow keys and the Enter key.
After closing a menu, the focus must return to the previously focused widget.
At least, WApplication::globalKeyWentDown needs to work in order to be able to implement user-friendly menus.
We would greatly appreciate if there will be added generic keyboard support for menus.

Actions #1

Updated by Michael Seibt 11 days ago

WApplication::globalKeyWentDown is also dead as long as a WLineEdit or a WComboBox -- most likely any WFormWidget -- is focused.
Though the widget's keyWentDown signal is emitted, i.e. the event is not internally consumed by the browser.
So it should be easy to emit globalKeyWentDown regardless of the focused widget.

Actions #2

Updated by Michael Seibt 6 days ago

WDialog::keyWentDown, WDialog::enterPressed, WDialog::escapePressed, etc. are affected as well!

Actions

Also available in: Atom PDF