Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
None
-
1652687d3 (dev), 11456b4d5 (6.6), 2aebbfc9f (tqtc/lts-6.2), 5df751774 (6.5), c0d108b50 (dev)
Description
QWaylandSeat::sendFullKeyEvent can be used to send key event, but it has a big caveat with sending keys that need modifiers. To send such a key event, one has to know what is the base key that must be pressed together with the modifier to produce it, which requires knowing the current keyboard layout in use.
For example to send (, one has to send Key_9 with ShiftModifier on english layout, but on other layouts it could be something different, for example 8+shift on finnish layout.
Perhaps a new function could be added for constructing a QKeyEvent for the desired key or perhaps even for a unicode codepoint (or separetely for both, there are special keys like print screen).
I suspect this function should also be allowed to fail as all keys are not available in all layouts. Maybe it could return QKeyEvent* or in a smart pointer.
Attachments
Issue Links
- relates to
-
QTBUG-74479 Rewrite QWaylandSeat::sendKeyEvent() via text-input extenssion or extend core protocol
- Closed