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. Incorrect received key codes between MobaXterm/xcb

Incorrect received key codes between MobaXterm/xcb

Scheduled Pinned Locked Moved Solved QML and Qt Quick
x11xcbmobaxtermqmlwayland
5 Posts 1 Posters 789 Views
  • 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.
  • D Offline
    D Offline
    DMllr
    wrote on last edited by DMllr
    #1

    Hey all,

    i figured out a problem receiving specific key event codes working with the minimal-qml example in my WSL-Ubuntu-22.04.

    Link to the minimal-qml example i am using:
    https://doc.qt.io/qt-5/qtwaylandcompositor-minimal-qml-example.html

    The WSL-distribution runs on a VMWare image on my host PC. For an overview:
    Host-PC >> VMware >> WSL (WSL-Ubuntu-22.04)/MobaXterm >> Compositor (minimal-qml) started via platform xcb
    The problematic is that some pressed keys returning incorrect (maybe wrongly mapped) key codes.

    The keys i have scouted out are:

    • all 4 Arrow Keys (left, down, right, up)
    • Numpad Enter (the normal enter works as intended)

    I am using the QWERTZ Keyboard Layout (ENG/GER).
    I derived from the QGuiApplication to catch the event. Other piece of code is totally unchanged. See below:

    wrong_keyevent_1.png

    In the next picture you can see the not-matching keys with the actual pressed keys written next to it:

    wrong_keyevent_2.png

    Is anyone possible to give me a response (solution)? Or might it be there is an issue with my image or sth else?
    It seems that this line in the main function is also related to/occurs the problem:
    QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml"));
    It uses the QtWayland.Compositor.
    I did not test any single key, but the other keys i have tested are working fine.
    I have tested this issue with 3 PCs.

    Let me know if you need further details.

    Thank you for your help!

    greetings
    Domi

    D 2 Replies Last reply
    0
    • D DMllr

      Hey all,

      i figured out a problem receiving specific key event codes working with the minimal-qml example in my WSL-Ubuntu-22.04.

      Link to the minimal-qml example i am using:
      https://doc.qt.io/qt-5/qtwaylandcompositor-minimal-qml-example.html

      The WSL-distribution runs on a VMWare image on my host PC. For an overview:
      Host-PC >> VMware >> WSL (WSL-Ubuntu-22.04)/MobaXterm >> Compositor (minimal-qml) started via platform xcb
      The problematic is that some pressed keys returning incorrect (maybe wrongly mapped) key codes.

      The keys i have scouted out are:

      • all 4 Arrow Keys (left, down, right, up)
      • Numpad Enter (the normal enter works as intended)

      I am using the QWERTZ Keyboard Layout (ENG/GER).
      I derived from the QGuiApplication to catch the event. Other piece of code is totally unchanged. See below:

      wrong_keyevent_1.png

      In the next picture you can see the not-matching keys with the actual pressed keys written next to it:

      wrong_keyevent_2.png

      Is anyone possible to give me a response (solution)? Or might it be there is an issue with my image or sth else?
      It seems that this line in the main function is also related to/occurs the problem:
      QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml"));
      It uses the QtWayland.Compositor.
      I did not test any single key, but the other keys i have tested are working fine.
      I have tested this issue with 3 PCs.

      Let me know if you need further details.

      Thank you for your help!

      greetings
      Domi

      D Offline
      D Offline
      DMllr
      wrote on last edited by DMllr
      #2

      @DMllr

      I am appending a third picture where you can see an example project (testwidget) which only shows a test widget to be able to press keys. The key inputs (Arrows + Numberpad Enter) works as intended:

      wrong_keyevent_3.png

      The third picture serves the purpose of comparison with the second one.

      Overview about incorrect key values:

      • all 4 Arrow Keys (left, down, right, up)
        returns:
        Arrow left >> Key_Henkan
        Arrow down >> Key_Enter + "\r"
        Arrow right >> Key_Muhenkan
        Arrow up >> Key_Katakana

      • Numpad Enter (the normal enter works as intended)
        returns:
        Numperpad Enter >> Key_Alt + AltModifier

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DMllr
        wrote on last edited by
        #3

        UPDATE
        The issue also exists without using VMware. So forget VMware for now.
        The problem must happen in interaction of MobaXterm/xcb/wayland ..

        1 Reply Last reply
        0
        • D DMllr

          Hey all,

          i figured out a problem receiving specific key event codes working with the minimal-qml example in my WSL-Ubuntu-22.04.

          Link to the minimal-qml example i am using:
          https://doc.qt.io/qt-5/qtwaylandcompositor-minimal-qml-example.html

          The WSL-distribution runs on a VMWare image on my host PC. For an overview:
          Host-PC >> VMware >> WSL (WSL-Ubuntu-22.04)/MobaXterm >> Compositor (minimal-qml) started via platform xcb
          The problematic is that some pressed keys returning incorrect (maybe wrongly mapped) key codes.

          The keys i have scouted out are:

          • all 4 Arrow Keys (left, down, right, up)
          • Numpad Enter (the normal enter works as intended)

          I am using the QWERTZ Keyboard Layout (ENG/GER).
          I derived from the QGuiApplication to catch the event. Other piece of code is totally unchanged. See below:

          wrong_keyevent_1.png

          In the next picture you can see the not-matching keys with the actual pressed keys written next to it:

          wrong_keyevent_2.png

          Is anyone possible to give me a response (solution)? Or might it be there is an issue with my image or sth else?
          It seems that this line in the main function is also related to/occurs the problem:
          QQmlApplicationEngine appEngine(QUrl("qrc:///main.qml"));
          It uses the QtWayland.Compositor.
          I did not test any single key, but the other keys i have tested are working fine.
          I have tested this issue with 3 PCs.

          Let me know if you need further details.

          Thank you for your help!

          greetings
          Domi

          D Offline
          D Offline
          DMllr
          wrote on last edited by
          #4

          @DMllr

          After further investigations the problem seems to come from Qt not MobaXterm.
          I used the tool xev to see all incoming events to MobaXterm.

          instrument@DESKTOP-9TTCIM5:~$ xev -id 2621454

          EnterNotify event, serial 18, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7866500, (597,250), root:(735,411),
          mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
          focus NO, state 0

          KeymapNotify event, serial 18, synthetic NO, window 0x0,
          keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
          0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

          FocusIn event, serial 18, synthetic NO, window 0x28000e,
          mode NotifyNormal, detail NotifyNonlinear

          KeymapNotify event, serial 18, synthetic NO, window 0x0,
          keys: 4294967284 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
          0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

          PropertyNotify event, serial 18, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7867250, state PropertyNewValue

          PropertyNotify event, serial 18, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7867296, state PropertyNewValue

          KeyRelease event, serial 19, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7869140, (404,79), root:(542,240),
          state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyPress event, serial 19, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7869140, (404,79), root:(542,240),
          state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 bytes:
          XmbLookupString gives 0 bytes:
          XFilterEvent returns: False

          PropertyNotify event, serial 19, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7869140, state PropertyNewValue

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7869218, (404,79), root:(542,240),
          state 0x0, keycode 100 (keysym 0xff51, Left), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7870890, (404,79), root:(542,240),
          state 0x0, keycode 104 (keysym 0xff54, Down), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyPress event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7870890, (404,79), root:(542,240),
          state 0x0, keycode 104 (keysym 0xff54, Down), same_screen YES,
          XLookupString gives 0 bytes:
          XmbLookupString gives 0 bytes:
          XFilterEvent returns: False

          PropertyNotify event, serial 22, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7870890, state PropertyNewValue

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7870921, (404,79), root:(542,240),
          state 0x0, keycode 104 (keysym 0xff54, Down), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7871468, (404,79), root:(542,240),
          state 0x0, keycode 102 (keysym 0xff53, Right), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyPress event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7871468, (404,79), root:(542,240),
          state 0x0, keycode 102 (keysym 0xff53, Right), same_screen YES,
          XLookupString gives 0 bytes:
          XmbLookupString gives 0 bytes:
          XFilterEvent returns: False

          PropertyNotify event, serial 22, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7871468, state PropertyNewValue

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7871546, (404,79), root:(542,240),
          state 0x0, keycode 102 (keysym 0xff53, Right), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7872015, (404,79), root:(542,240),
          state 0x0, keycode 98 (keysym 0xff52, Up), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyPress event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7872015, (404,79), root:(542,240),
          state 0x0, keycode 98 (keysym 0xff52, Up), same_screen YES,
          XLookupString gives 0 bytes:
          XmbLookupString gives 0 bytes:
          XFilterEvent returns: False

          PropertyNotify event, serial 22, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7872015, state PropertyNewValue

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7872062, (404,79), root:(542,240),
          state 0x0, keycode 98 (keysym 0xff52, Up), same_screen YES,
          XLookupString gives 0 bytes:
          XFilterEvent returns: False

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7873062, (404,79), root:(542,240),
          state 0x0, keycode 108 (keysym 0xff8d, KP_Enter), same_screen YES,
          " XLookupString gives 1 bytes: (0d) "
          XFilterEvent returns: False

          KeyPress event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7873062, (404,79), root:(542,240),
          state 0x0, keycode 108 (keysym 0xff8d, KP_Enter), same_screen YES,
          " XLookupString gives 1 bytes: (0d) "
          " XmbLookupString gives 1 bytes: (0d) "
          XFilterEvent returns: False

          PropertyNotify event, serial 22, synthetic NO, window 0x28000e,
          atom 0x118 (_NET_WM_USER_TIME), time 7873062, state PropertyNewValue

          KeyRelease event, serial 22, synthetic NO, window 0x28000e,
          root 0x1f4, subw 0x0, time 7873078, (404,79), root:(542,240),
          state 0x0, keycode 108 (keysym 0xff8d, KP_Enter), same_screen YES,
          " XLookupString gives 1 bytes: (0d) "
          XFilterEvent returns: False

          1 Reply Last reply
          0
          • SGaistS SGaist moved this topic from General and Desktop on
          • D Offline
            D Offline
            DMllr
            wrote on last edited by
            #5

            Problem solved.
            The issue was the default seat inside of the compositor was unset. Means the keymap attributes were emtpy. I have set it manually and now it works.

            0948-0046-07-0A-TJ-0.jpeg

            1 Reply Last reply
            1
            • D DMllr has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved