Forward native key codes to QWindowSystemInterface

Using QWindowSystemInterface::handleExtendedKeyEvent() instead of
QWindowSystemInterface::handleKeyEvent(). While the former allows
us to forward the native key codes to QWindowSystemInterface, the
latter initializes them with 0, causing QKeyEvent::native*() to
return 0, instead of the actual values.

Change-Id: I596ad2e07645e091529ca514682c98d095244a73
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Rafael Roquetto 2012-03-29 10:54:29 +02:00 committed by Qt by Nokia
parent 06001ce008
commit 83e7f61b61

View File

@ -160,7 +160,8 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
key = keyTranslator(cap);
}
QWindowSystemInterface::handleKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod, keyStr);
QWindowSystemInterface::handleExtendedKeyEvent(QGuiApplication::focusWindow(), type, key, qtMod,
scan, sym, modifiers, keyStr);
#if defined(QQNXSCREENEVENT_DEBUG)
qDebug() << "QQNX: Qt key t=" << type << ", k=" << key << ", s=" << keyStr;
#endif