Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.15.7, 6.2
-
None
Description
All received keyboard events contain AltModifier after performing system shortcut Alt+Tab.
Press- release Alt key does not restore the modifiers state.
The issue is observed on apps which use WaylandCompositor.
Checked on Ubuntu 20.04 with Qt 5.15.7 and Qt 6.2.3.
Other Qt versions were not checked.
Attached example based on Qt example Qt/Examples/Qt-6.2.3/wayland/minimal-qml.
Just Keys.onPressed and Keys.onReleased slots were added to Window content.
Keys.onPressed: (event)=> { console.warn("Keys.onPressed: " + JSON.stringify(event)); } Keys.onReleased: (event)=> { console.warn("Keys.onReleased: " + JSON.stringify(event)); }
console output:
- the first Alt+Tab performed: focus moved app -> QtCreator
qml: Keys.onPressed: {"objectName":"","key":16777251,"text":"","modifiers":134217728,"isAutoRepeat":false,"count":1,"nativeScanCode":64,"accepted":false}
Note: key:16777251 = Key_Alt
- the second Alt+Tab performed: focus moved back QtCreator -> app
qml: Keys.onReleased: {"objectName":"","key":16777217,"text":"\t","modifiers":134217728,"isAutoRepeat":false,"count":1,"nativeScanCode":23,"accepted":false}
Note: key:16777217 = Key_Tab, modifiers = AltModifier
- Then all next key input contains AltModifier, user pressed just "q" key
qml: Keys.onPressed: {"objectName":"","key":81,"text":"q","modifiers":134217728,"isAutoRepeat":false,"count":1,"nativeScanCode":24,"accepted":false}
qml: Keys.onReleased: {"objectName":"","key":81,"text":"q","modifiers":134217728,"isAutoRepeat":false,"count":1,"nativeScanCode":24,"accepted":false}
Note: key:81 = Key_Q, modifiers = AltModifier
Attachments
Issue Links
- duplicates
-
QTBUG-101862 [Wayland] Shortcut no longer activated after Alt+Tab when using WaylandCompositor/WaylandOutput in QML application
- Closed
- relates to
-
QTBUG-94404 No Tab Navigation After Switching Wayland Window
- Closed