Skip to content

Held Alt and Windows modifiers read as released on X11, Android and framebuffer #25401

Closed

Description

@ramezgerges

Current behavior 🐛

On X11, Android and the Linux framebuffer, holding a modifier and pressing another key makes CoreWindow.GetKeyState report the modifier as released while it is still held:

  • X11: with Alt held, pressing F makes GetKeyState(VirtualKey.Menu) report None and GetKeyState(VirtualKey.Shift) report Down. The X11 mapper reports Mod1Mask (Alt) as Shift.
  • Android: with Alt held, the next key makes GetKeyState(VirtualKey.Menu) report None. The meta-state mapper drops the Alt bits.
  • Linux framebuffer: with a Windows (Meta) key held, the next key makes GetKeyState report the Windows key as None. The framebuffer source never reports the Windows modifier.

Since #24575, the modifier state is resynced from each key event's KeyboardModifiers. That resync trusts the modifiers each platform reports, so a modifier the mapper leaves out is marked released.

Expected behavior 🎯

A held modifier reads Down from CoreWindow.GetKeyState until it is released. Key events carry VirtualKeyModifiers.Menu while Alt is held, and VirtualKeyModifiers.Windows while a Windows key is held.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. Run the SamplesApp on X11 and open the KeyboardStateProbe sample. It logs KEYSTATE ... lines whenever the polled GetKeyState values change.
  2. Hold Alt, press F, release Alt.
  3. The log shows menu=Down, then shift=Down menu=None once F is pressed, even though Alt is still held.

Workaround 🛠️

None.

Affected platforms 📱💻🖥️

Android, Desktop (X11), Desktop (Linux Framebuffer)

Uno.Sdk version (and other relevant versions) 📦

master, since #24575.

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

The X11 and Android mappers were wrong before #24575, but then the wrong value only affected that event's KeyModifiers. Since #24575 the resync uses it to rewrite the tracked key state.

Activity

  1. added
    triage/untriaged
    on Oct 13, 2026
  2. added
    7.0
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    7.0triage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions