summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index 55381b450..986f819ff 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -175,7 +175,11 @@ void QWaylandKeyboardPrivate::keyboard_release(wl_keyboard::Resource *resource)
void QWaylandKeyboardPrivate::keyEvent(uint code, uint32_t state)
{
+#if QT_CONFIG(xkbcommon_evdev)
uint key = toWaylandXkbV1Key(code);
+#else
+ uint key = code;
+#endif
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
keys << key;
} else {
@@ -187,7 +191,11 @@ void QWaylandKeyboardPrivate::sendKeyEvent(uint code, uint32_t state)
{
uint32_t time = compositor()->currentTimeMsecs();
uint32_t serial = compositor()->nextSerial();
+#if QT_CONFIG(xkbcommon_evdev)
uint key = toWaylandXkbV1Key(code);
+#else
+ uint key = code;
+#endif
if (focusResource)
send_key(focusResource->handle, serial, time, key, state);
}