Qt 6.12 LTS is out! See what's new in the release
blog
Qt 5.15 "Unhandled key code" on Android (PAX A920)
-
I have an empty Qt Quick app that runs on Android on a PAX A920 device.
My main.qml is this:import QtQuick 2.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Item { anchors.fill: parent focus: true Keys.onReleased: { console.log("KEY RELEASED " + event.key + " " + event.modifiers + " " + event.nativeScanCode); event.accepted = true } } }When I press the Android home button, nothing happens, and the console is printing this error:
W libAndroidTest_armeabi-v7a.so: Unhandled key code 3 ! D libAndroidTest_armeabi-v7a.so: qml: KEY RELEASED 0 0 0The same thing is happening when I press the square button for listing opened apps:
W libAndroidTest_armeabi-v7a.so: Unhandled key code 187 ! D libAndroidTest_armeabi-v7a.so: qml: KEY RELEASED 0 0 0On my phone everything works, so it seems related to PAX A920, but WhatsApp installed on the PAX works good.
How can I solve this problem? I don't need to intercept the home button in my app, I just need it to work.
I made an empty project with Android Studio and the navbar works correctly. Unfortunately I need to make it work with Qt.