diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2017-12-29 15:56:33 +0100 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2017-12-30 12:09:53 +0100 |
| commit | db92f2f3aac60218756a1aa8811cf192acc0b0e6 (patch) | |
| tree | f28a47aebb2f08e221fe7bffafce62a0a96cf7fd /src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | |
| parent | dd61a1d98ea9fbffeaf0e2adcd0ddd58105f6a75 (diff) | |
| parent | 44da5b863597e761df3545dc7ff02a9b53bbb13d (diff) | |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
.qmake.conf
mkspecs/win32-g++/qmake.conf
src/corelib/global/qglobal_p.h
src/corelib/global/qoperatingsystemversion_p.h
src/corelib/io/qfilesystemengine_win.cpp
src/network/bearer/qbearerengine.cpp
src/platformsupport/input/libinput/qlibinputpointer.cpp
src/sql/doc/snippets/code/doc_src_sql-driver.cpp
src/widgets/kernel/qwidget_p.h
src/widgets/kernel/qwidgetwindow.cpp
src/widgets/styles/qfusionstyle.cpp
tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
Diffstat (limited to 'src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp')
| -rw-r--r-- | src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp index 960f1d2f128..1046b86ec6b 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -49,6 +49,9 @@ #include <qpa/qwindowsysteminterface.h> #include <private/qcore_unix_p.h> +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/private/qinputdevicemanager_p.h> + #ifdef Q_OS_FREEBSD #include <dev/evdev/input.h> #else @@ -222,6 +225,8 @@ void QEvdevKeyboardHandler::readKeycode() void QEvdevKeyboardHandler::processKeyEvent(int nativecode, int unicode, int qtcode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat) { + QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(modifiers, qtcode); + QWindowSystemInterface::handleExtendedKeyEvent(0, (isPress ? QEvent::KeyPress : QEvent::KeyRelease), qtcode, modifiers, nativecode + 8, 0, int(modifiers), (unicode != 0xffff ) ? QString(unicode) : QString(), autoRepeat); @@ -403,6 +408,8 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint Qt::KeyboardModifiers qtmods = Qt::KeyboardModifiers(qtcode & modmask); qtcode &= ~modmask; + // qtmods here is the modifier state before the event, i.e. not + // including the current key in case it is a modifier. qCDebug(qLcEvdevKeyMap, "Processing: uni=%04x, qt=%08x, qtmod=%08x", unicode, qtcode, int(qtmods)); // If NumLockOff and keypad key pressed remap event sent |
