Skip to content

KeyDown event does not work with multiple keys pressed simultaneously #10685

@alienghub

Description

@alienghub

Describe the bug

  1. I press key A, A type keydown event is being sent
  2. I hold A pressed, A type keydown events are still being sent
  3. I press key B and keep it pressed, only B type keydown events are being sent (A is still pressed)
  4. I release key B while A is still pressed, no keydown events are being sent

Steps to reproduce the bug

void keypress(Object sender, KeyRoutedEventArgs e)
{
           if (e.Key == Windows.System.VirtualKey.Up)
            {
               //doSmth
            }
            if (e.Key == Windows.System.VirtualKey.Down)
            {
               //doSmth;
            }
            if (e.Key == Windows.System.VirtualKey.Right)
            {
               //doSmth
            }
            if (e.Key == Windows.System.VirtualKey.Left)
            {
               //doSmth
            }
}

### Expected behavior

Keydown events are being generated for each pressed key, one key does not dominate the keydown event queue

### Screenshots

_No response_

### NuGet package version

WinUI 3 - Windows App SDK 1.1 Preview 2: 1.1.0-preview2

### Windows app type

- [ ] UWP
- [ ] Win32

### Device form factor

_No response_

### Windows version

Windows 10 (21H2): Build 19044

### Additional context

_No response_

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-triageIssue needs to be triaged by the area ownersteam-CompInputIssue for IXP (Composition, Input) team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions