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

The keyboard doesn't work in Qt 5.15.14 + DirectFB 1.7.7.

XMLWordPrintable

    • Linux/Other display system

      One customer found the key event didn't work on i.mx6 + Qt 5.15.14 + DirectFB 1.7.7. And I reproduced the issue on Toradex i.mx8.
      Test code:

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          // Item {
          Rectangle{
              color: "green"
              anchors.fill: parent
              focus: true
              Keys.onPressed: {
                  console.log("Keys.onPressed", event.key)
                  if (event.key == Qt.Key_Enter) state = 'ShowDetails';
              }
          }
      
      }
      

      After some invastigation, we found something maybe useful.
      First, nothing get from here:

      void QDirectFbInput::handleEvents()
      {
         qDebug() << "QDirectFbInput::handleEvents";
          DFBResult hasEvent = m_eventBuffer->HasEvent(m_eventBuffer.data());
          while(hasEvent == DFB_OK){
              qDebug() << "QDirectFbInput::handleEvents DFB_OK";
              DFBEvent event;
              DFBResult ok = m_eventBuffer->GetEvent(m_eventBuffer.data(), &event);
              if (ok != DFB_OK)
                  DirectFBError("Failed to get event",ok);
              qDebug() << "QDirectFbInput::handleEvents DFB_OK2";
              if (event.clazz == DFEC_WINDOW) {
                  switch (event.window.type) {
                  case DWET_BUTTONDOWN:
      

      Second, we found qdirectfbinput use ditrectfb api createEventBuffer to get input event now, and we tried to change to createInputEventBuffer and got the key event successfully but the the window id(761) from key event is wrong(normal id is like 1, 2, 3.).

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

            teemu.holappa Teemu Holappa
            mawang Mark Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes