Incorrect received key codes between MobaXterm/xcb
-
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.htmlThe 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:In the next picture you can see the not-matching keys with the actual pressed keys written next to it:
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 -
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:
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
-
-
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 0KeymapNotify 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 0FocusIn event, serial 18, synthetic NO, window 0x28000e,
mode NotifyNormal, detail NotifyNonlinearKeymapNotify 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 0PropertyNotify event, serial 18, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7867250, state PropertyNewValuePropertyNotify event, serial 18, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7867296, state PropertyNewValueKeyRelease 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: FalseKeyPress 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: FalsePropertyNotify event, serial 19, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7869140, state PropertyNewValueKeyRelease 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: FalseKeyRelease 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: FalseKeyPress 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: FalsePropertyNotify event, serial 22, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7870890, state PropertyNewValueKeyRelease 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: FalseKeyRelease 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: FalseKeyPress 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: FalsePropertyNotify event, serial 22, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7871468, state PropertyNewValueKeyRelease 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: FalseKeyRelease 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: FalseKeyPress 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: FalsePropertyNotify event, serial 22, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7872015, state PropertyNewValueKeyRelease 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: FalseKeyRelease 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: FalseKeyPress 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: FalsePropertyNotify event, serial 22, synthetic NO, window 0x28000e,
atom 0x118 (_NET_WM_USER_TIME), time 7873062, state PropertyNewValueKeyRelease 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 -
-