-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shift key locked in when pressed once in Wayland #7273
Comments
I tried to reproduce this under Gnome (Wayland) but I'm not having any luck :-(. @rakhusur could you try installing Similarly, if you could run the slint app that reproduces this on your machine while |
Sorry for the long delay. Here’s the output of
Something strange seems to be going on with Caps_Lock?
I found out that the bug is related to the keyboard layout used. A minimal way to reproduce for me is to activate the "German (Neo 2)" layout. (This is an 8-layer layout with additional modifier keys, but the shift keys should be left untouched.) And now it gets wierd: if both this layout and a more standard, say US, are configured in gnome settings, the order matters. If, in the gnome settings dialog, the US is placed above neo, the bug appears only when |
Thanks for the detailed info, with your mention of the keyboard layout I can reproduce this. I think that this is a bug in the symbol mapping for the keyboard layout, but I think we should work around it. |
Looks like our logic for using the key press and release events to determine the modifier state in Slint is incompatible with this particular buggy keyboard layout. The way we should work around it is to use to the modifier state reported by the windowing system to determine the modifier state in Slint. This applies to the Qt as well as the Winit backend, and probably the linuxkms backend, too. We should perhaps work around it by mapping the modifier state changes reported by the windowing system to synthetic key press/release events in Slint for the modifier keys. The other option would be to introduce a modifier specific event in the Slint window event API, but that would probably break existing custom platform backends. |
Narrowed it down a little bit: the culprit is the |
Interesting! So this is more widespread and not entirely specific to this layout. Thanks for digging :) |
Bug Description
Hi,
I’m experiencing the following bug, which seems similar to #6263 , but occurs under different conditions.
When pressing and releasing the shift key when a slint window is focused, the shift state becomes locked in for the following purposes:
• Turning the scroll wheel scrolls horizontally instead of vertically
• Clicking on a TextInput (or LineEdit or TextEdit) or pressing movement keys when it’s focused causes text to be selected instead of just cursor movement.
Pressing shift again doesn’t help, but focusing a different window does.
It occurs with both the winit and Qt backend as well as in the preview window of the VSCode extension. The issue appears on wayland but not on Xorg.
Reproducible Code (if applicable)
Environment Details
Product Impact
No response
The text was updated successfully, but these errors were encountered: