Actions
Improvements #14321
openClarification WApplication::globalKeyWentDown/Up and WDialog::keyWentDown/Up
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/10/2026
Due date:
% Done:
0%
Estimated time:
Description
Affected: docs and concept of Wt 4.12.2 (and former versions)
split from Improvements #13791: WApplication::globalKeyWentDown dead as long as WMenu focused by mouse click
Wt::WApplication::globalKeyWentDown()
Event signal emitted when a keyboard key is pushed down.
The application receives key events when no widget currently has focus. Otherwise, key events are handled by the widget in focus, and its ancestors.
Wt::WDialog::keyWentDown()
Event signal emitted when a keyboard key is pushed down.
The event will be triggered if nothing in the WDialog has focus
- Both docs are not exact. "no widget" / "nothing" might mean "no WFormWidget" or some other base class. The events do fire if f.i. a
WTableViewis focused. - In UI frameworks, global
KeyWentDownusually fires on all key presses regardless of the focus (and provides means to intercept keypresses). One can simulate this to a certain degree by adding the handler to all widgets. This is error-prone, pretty inconvenient and not feasible for e.g.WMenubecause it does not expose such signals. - I see no difference between these signals of
WApplicationandWDialog. Why different names?
Files
Actions