Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.15 "Unhandled key code" on Android (PAX A920)
Qt 6.12 LTS is out! See what's new in the release blog

Qt 5.15 "Unhandled key code" on Android (PAX A920)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 429 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fausto01
    wrote on last edited by
    #1

    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 0
    

    The 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 0
    

    On 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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt
    • Unsolved