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

WASM: Qt Virtual Keyboard does not auto-activate or send key press events

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.5, 6.7.0 RC, 6.7.2, 6.8.0 Beta3
    • Virtual Keyboard
    • Windows 10 22H2, Mozilla Firefox 123.0.1 and Microsoft Edge 122.0.2365.92 static Qt
    • Linux/Other display system, macOS, WebAssembly
    • c844a7a5429e74d7cefb9774f288dbaa76fc2bbb

    Description

      See the attached project, which is a simple Qt Quick project generated by Qt Creator with Qt VKB enabled. I only added a button and TextField.

      Code

      import QtQuick
      import QtQuick.Controls.Basic
      import QtQuick.VirtualKeyboard
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Column {
              Button {
                  text: "Manually Activate VKB"
                  onClicked: inputPanel.active = true
              }
              TextField {}
          }
      
          InputPanel {
              id: inputPanel
              z: 99
              x: 0
              y: window.height
              width: window.width
      
              states: State {
                  name: "visible"
                  when: inputPanel.active
                  PropertyChanges {
                      target: inputPanel
                      y: window.height - inputPanel.height
                  }
              }
          }
      }
      

       

      Steps to reproduce

      1. Build and run the attached project
      2. Click/tap on the TextField to give it focus
      3. Click on the "Manually Activate VKB"
      4. Click/tap on the TextField to give it focus
      5. Click on the virtual keys

       

      Expected outcomes (Windows kit)

      • Step #2: The virtual keyboard auto-appears
      • Step #5: The clicked characters appear in the TextField

       

      Unexpected outcomes (WASM kit)

      • Step #2: Nothing happens
      • Step #3: The virtual keyboard appears (which is good)
      • Step #5: Nothing appears in the TextField. The debug console says, "input method is not set"

      Attachments

        1. HelloWorldVkb.zip
          2 kB
          Sze Howe Koh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lopotter-ext Lorn Potter
            skoh-qt Sze Howe Koh
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change