summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevkeyboard
diff options
context:
space:
mode:
authorKarim Pinter <karim.pinter@qt.io>2018-04-06 18:03:08 +0300
committerKarim Pinter <karim.pinter@qt.io>2018-05-02 10:41:43 +0000
commit2803cdf758dbae1006a0c50300af12dac9f71531 (patch)
treee56332b25c35d1c184385b23e4a6cb90daaaeaf4 /src/platformsupport/input/evdevkeyboard
parentae618e069418621544a4c78984fbac61f2084195 (diff)
Fix for mouse with modifiers handling
Modifier keys are saved in qinputdevicemanager such way that both evdev and libinput can use it the same way, it is also handling the repeating modifier key events. Evdev support is important for VxWorks support because it is using it. Task-number: QTBUG-60694 Change-Id: I49038cb7fe2ad5134b3a37167c19953867ea31c3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevkeyboard')
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
index 47a65eded8..b21d5d9ef5 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp
@@ -225,7 +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);
+ if (!autoRepeat)
+ QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(QEvdevKeyboardHandler::toQtModifiers(m_modifiers));
QWindowSystemInterface::handleExtendedKeyEvent(0, (isPress ? QEvent::KeyPress : QEvent::KeyRelease),
qtcode, modifiers, nativecode + 8, 0, int(modifiers),