diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2023-04-17 14:34:22 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-04-18 14:24:59 +0000 |
commit | 379101300f8b8765399e0ffb1fb87cb841a1ea01 (patch) | |
tree | 847bbef138cabf9cd4409059d75570e69d53fe2a /src | |
parent | e28330047e622b4e8c41c6425e05147a60578182 (diff) | |
download | qtwayland-379101300f8b8765399e0ffb1fb87cb841a1ea01.tar.gz |
Document sendFullKeyEvent() and sendKeyEvent() limitations
Task-number: QTBUG-112853
Change-Id: I5ae7ee194e8415c5e34ecde2d93086885866abfd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 558babd4bc3cbd1f6eb9f17f263313fd7b40069a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor/compositor_api/qwaylandseat.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandseat.cpp b/src/compositor/compositor_api/qwaylandseat.cpp index ee447da5..375202fb 100644 --- a/src/compositor/compositor_api/qwaylandseat.cpp +++ b/src/compositor/compositor_api/qwaylandseat.cpp @@ -434,6 +434,11 @@ void QWaylandSeat::sendFullTouchEvent(QWaylandSurface *surface, QTouchEvent *eve /*! * Sends the \a event to the keyboard device. + * + * \note The \a event should correspond to an actual keyboard key in the current mapping. + * For example, \c Qt::Key_Exclam is normally not a separate key: with most keyboards the + * exclamation mark is produced with Shift + 1. In that case, to send an exclamation mark + * key press event, use \c{QKeyEvent(QEvent::KeyPress, Qt::Key_1, Qt::ShiftModifier)}. */ void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event) { @@ -513,6 +518,9 @@ void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event) * Sends a key press (if \a pressed is \c true) or release (if \a pressed is \c false) * event of a key \a qtKey to the keyboard device. * + * \note This function does not support key events that require modifiers, such as \c Qt::Key_Exclam. + * Use \l{sendFullKeyEvent} instead. + * * \since 5.12 */ void QWaylandSeat::sendKeyEvent(int qtKey, bool pressed) |