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

HW Keyboard input is broken after touching UI

    XMLWordPrintable

Details

    • Android
    • 25852624e (dev), bdca63dba (6.8), 0d1ebc468 (6.7), dc71864d4 (dev), b48b0dba6 (6.8), 8ff35d679 (6.7), 3f9f22591 (tqtc/lts-6.5)
    • 2024wk26s2FOQtforAndroid, 2024wk38s2FOQtforAndroid, 2024wk32s2FOQtforAndroid, 2024wk40s3FOQtforAndroid, 2024wk44s3FOQtforAndroid

    Description

      After focusing a TextField or Button with a touch and (back)tabbing to change UI focus to another UI element, pressing space no longer activates the button.

      Minimal app included as App-1.qml, with reproduction videos described in the comments.

      Looks like changing to a TextField has caused this bug for a long time, but only recently has begun to reproduce by pressing Buttons as well.

       Steps to reproduce

      1. Move focus to first button with Tab
      2. Press space -> Text updates to denote successful button activation
      3. Touch/tap 2nd button -> Text updates, 2nd button is now focused
      4. Move focus to 3rd button with Tab
      5. Press space -> nothing happens.

      Expected result

      User should be able to use HW keyboard normally after touching the UI.

      Actual result

      After touching the UI, HW input no longer works normally.

       

      Original report:

      Qt 6.7 introduced an issue with hardware keyboard input on Android. More specifically on ChromeOS. Even though this platform is not officially supported, this is a regression from Qt 6.6 --> Qt 6.7.

      In the attached MWE, once a "click" event via touchscreen or mouse is done, the hardware keyboard input is faulty. All inputs which make sense in a text input field (digits, chars, space, ...) are not dispatched to the actual app. Return/Enter and special keys like Tab, Ctrl, and Shift are still received by the app.

      This results in an issue with keyboard navigation as the focus can be changed via Tab/Backtab but no "activation" using Space is possible. Strangely this is not the case on an Android Smartphone when inputting with a bluetooth keyboard. All input events are propagated to the app and the correct text input field, too.

      To clarify, this problem makes the combined usage of the mouse/touchscreen and keyboard navigation unusable as activation of elements with Space does no longer work.

      Several commits from QTBUG-118139 modified the handling of text input on Android. I'm still trying to figure out if/what broke the behavior on ChromeOS.

      Attachments

        1. App-1.qml
          0.5 kB
        2. touchInputOnButton.mp4
          110 kB
        3. touchInputOnTextfield.mp4
          194 kB
        For Gerrit Dashboard: QTBUG-126187
        # Subject Branch Project Status CR V

        Activity

          People

            pevirkku Petri Virkkunen
            janmoeller Jan Möller
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: