Repository navigation
fix: Report held Alt and Windows modifiers on X11, Android and framebuffer (backport #25402) - #25950
Merged
agneszitte merged 3 commits intoNov 2, 2026
Conversation
Mod1, the Alt modifier, was reported as Shift, so a key pressed with Alt held carried Shift instead of Menu. Since the modifier state is resynced from each key event's modifiers, holding Alt and pressing another key marked Alt released and Shift held, and CoreWindow.GetKeyState(Menu) read up for the rest of the press. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 1728fd4)
The meta state's Alt bits were never mapped, so key events carried no Menu modifier and the modifier resync marked a held Alt released on the next key. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 82a9e7a)
The Meta keys were never reported as the Windows modifier, so the modifier resync marked a held Windows key released on the next key. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 97e6dac)
2 of 5 tasks
agneszitte
approved these changes
Nov 2, 2026
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #25401
PR Type:
🐞 Bugfix
What changed? 🚀
Since #24575, the keyboard modifier state is resynced from each key event's
KeyboardModifiersbefore dispatch. Three platform mappers leave out a modifier that is held, so the resync marks it released andCoreWindow.GetKeyStatereads it as up while it is still down:Mod1Mask(Alt) was mapped toShift. It now maps toMenu. A duplicateControlMaskcheck is removed.AltMasknow maps toMenu.Windows.The tvOS keyboard source always reports
None, which is correct: it only carries Siri Remote presses, and the remote has no modifier keys.These mapper bugs predate #24575. Before it, a wrong modifier only affected that event's
KeyModifiers; the resync now uses it to rewrite the tracked key state. A backport of this PR will go out together with #24575's backport to 6.8 (#25155).Validation:
KeyboardStateProbesample, driven by real X events fromxdotool: hold Alt, press F, release Alt.menu=Down, thenshift=Down menu=Noneonce F is pressed while Alt is still held.menu=Downuntil Alt is released, and Shift staysNone.Uno.UI.Runtime.X11,Uno.UI.Runtime.Linux.FrameBufferandUno.WinRT(net11.0-android).PR Checklist ✅
KeyboardStateProbesample. The mappers are internal to the platform runtimes, which the runtime tests don't reference.Screenshots Compare Test Runresults.🤖 Generated with Claude Code
This is an automatic backport of pull request #25402 done by [Mergify](https://mergify.com).