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
Fix: Handle AltGr on Windows #2944
Conversation
I searched a bit on the internet why this would happen. |
Yes, I originally read that, too, but the information seems outdated by now. In
Ignoring that "stray" \u{11} seems like an acceptable solution, even thought that theoretically breaks Ctrl-AltGr-X key combos. |
So in a native Windows application, if you press "Ctrl + (left) Alt + Q", you don't get a "@" on your German keyboard ? |
Oh! |
New and improved! Now treats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming you tested that it works as expected with all combination
I did test I am now wondering whether there are keyboards with a right |
I think there are, but its probably usually mapped to altgr |
AltGr on windos sends a left control pressed followed by AltGr pressed on both winit and Qt. On AltGr release it sends left control released followed by AltGr released. So unset left control on windows once AltGr is pressed to avoid treating special characters entered via AltGr key combos to be treated as control sequences -- leading to the input being ignored! Also treat `Alt-Ctlr-X` as `AltGr-X` on windows. Fixes: slint-ui#2933
OK, this is what I tested this time round (using a german keyboard layout):
I think that should cover the option space... AltGr is AltR according to Wikipedia, so we should not need to cover that in Windows -- and we do anyway by using |
AltGr on windos sends a left control pressed followed by AltGr pressed on both winit and Qt. On AltGr release it sends left control released followed by AltGr released.
So unset left control on windows once AltGr is pressed to avoid treating special characters entered via AltGr key combos to be treated as control sequences -- leading to the input being ignored!
Fixes: #2933