You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Held Alt and Windows modifiers read as released on X11, Android and framebuffer #25401
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) 🔬
Run the SamplesApp on X11 and open the KeyboardStateProbe sample. It logs KEYSTATE ... lines whenever the polled GetKeyState values change.
Hold Alt, press F, release Alt.
The log shows menu=Down, then shift=Down menu=None once F is pressed, even though Alt is still held.
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