Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86182

ANDROID: KEYCODE_NUMPAD_* keys returning wrong value

    XMLWordPrintable

Details

    • Android

    Description

      We have a device running Android 10 which has a numeric keypad.  The key codes returned by the operating system (verified with KeyEvent Display app) are correct - i.e. NUMPAD_1 = 0x91.  However, when looking at the output from;

       Keys.onPressed: console.log(event.key) 

      The value returned is 0x20000091 - which is the sum of the Qt::KeypadModifier and the `key` value.  The event.modifier value is 0x00.  So the KeypadModifier isn't being handled correctly on Android.  Interestingly, the Text Area is able to process this mess and the correct numbers are displayed in the field when typed.

      NB: The workaround is to capture all the NUMPAD_* keycodes in Java in onKeyDown() and onKeyUp() and remap them to the non number pad versions before passing them on. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            dylan_white Dylan White
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes