microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Multiple windows in WinUI 3 cannot register hotkeys with the same hotkey ID.

Open GochenRyan opened this issue 1 year ago • 0 comments

Describe the bug

I want to call RegisterHotKey to register global hotkeys for different windows, but when the hotkey IDs are the same, the registration fails.

Steps to reproduce the bug

  1. Clone https://github.com/GochenRyan/WinUISample.git
  2. Checkout commit fe334cce48856a6dd842a9448098d746d09f649e
  3. Set Hotkeys as startup project
  4. Insert a break point at https://github.com/GochenRyan/WinUISample/blob/fe334cce48856a6dd842a9448098d746d09f649e/WinUISample/Hotkeys/GlobalHotkeyManager.cs#L43
  5. Upon running the application and clicking the 'Create new window' button, the attempt to register the hotkey will fail.

Expected behavior

No response

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

Windows version

Windows Insider Build (xxxxx)

Additional context

No response

GochenRyan avatar Oct 16 '24 03:10 GochenRyan