Skip to content

fix: Report held Alt and Windows modifiers on X11, Android and framebuffer (backport #25402) - #25950

Merged
agneszitte merged 3 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25402
Nov 2, 2026
Merged

agneszitte merged 3 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25402

Conversation

@mergify

@mergify mergify Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25401

PR Type:

🐞 Bugfix

What changed? 🚀

Since #24575, the keyboard modifier state is resynced from each key event's KeyboardModifiers before dispatch. Three platform mappers leave out a modifier that is held, so the resync marks it released and CoreWindow.GetKeyState reads it as up while it is still down:

  • X11: Mod1Mask (Alt) was mapped to Shift. It now maps to Menu. A duplicate ControlMask check is removed.
  • Android: the meta state's Alt bits were never mapped. AltMask now maps to Menu.
  • Linux framebuffer: the Meta keys were never reported. They now map to 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:

  • Runtime, X11 (WSLg): the KeyboardStateProbe sample, driven by real X events from xdotool: hold Alt, press F, release Alt.
    • master: menu=Down, then shift=Down menu=None once F is pressed while Alt is still held.
    • this PR: menu=Down until Alt is released, and Shift stays None.
  • Compile: Uno.UI.Runtime.X11, Uno.UI.Runtime.Linux.FrameBuffer and Uno.WinRT (net11.0-android).
  • Not validated at runtime: the Android and framebuffer changes.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable): validated with the existing KeyboardStateProbe sample. The mappers are internal to the platform runtimes, which the runtime tests don't reference.
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features): not applicable.
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code


This is an automatic backport of pull request #25402 done by [Mergify](https://mergify.com).

ramezgerges and others added 3 commits November 2, 2026 22:20
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)
@github-actions github-actions Bot added the platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform label Nov 2, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@agneszitte
agneszitte merged commit fa010ed into release/stable/6.7 Nov 2, 2026
38 of 45 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.7/pr-25402 branch November 2, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants