Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to handle "Unhandled key code"
Forum Updated to NodeBB v4.3 + New Features

How to handle "Unhandled key code"

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 627 Views 2 Watching
  • 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.
  • O Offline
    O Offline
    Oleg R.
    wrote on last edited by Oleg R.
    #1

    Hello,

    I'm developing software for PDA running Android. PDA has a few keys that I would like to handle in QML. While pressing the key I'm getting error in console: "Unhandled key code 294".

    How can I handle unknown keys?

    I do have eventFilter, but the message still shows up.

    raven-worxR 1 Reply Last reply
    0
    • O Oleg R.

      Hello,

      I'm developing software for PDA running Android. PDA has a few keys that I would like to handle in QML. While pressing the key I'm getting error in console: "Unhandled key code 294".

      How can I handle unknown keys?

      I do have eventFilter, but the message still shows up.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Oleg-R
      my guess is that this message comes from a 3rd party code/element you are using in your code?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      jeremy_kJ 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @Oleg-R
        my guess is that this message comes from a 3rd party code/element you are using in your code?

        jeremy_kJ Offline
        jeremy_kJ Offline
        jeremy_k
        wrote on last edited by
        #3

        @raven-worx said in How to handle "Unhandled key code":

        @Oleg-R
        my guess is that this message comes from a 3rd party code/element you are using in your code?

        It might be from the android QPA plugin.
        https://code.woboq.org/qt5/qtbase/src/plugins/platforms/android/androidjniinput.cpp.html#763

        In namespace QtAndroidInput,

        static int mapAndroidKey(int key)
            {
             ...
             switch (key) {
             ...
                    case 0x000000de: // KEYCODE_MEDIA_AUDIO_TRACK
                        return Qt::Key_AudioCycleTrack;
        
                    default:
                        qWarning() << "Unhandled key code " << key << '!';
                        return 0;
        

        Receiving the key press may require using a native event filter.

        https://doc.qt.io/qt-5/qabstracteventdispatcher.html#filterNativeEvent

        Asking a question about code? http://eel.is/iso-c++/testcase/

        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 Extensions
        • Unsolved