perf: 热键支持 Windows 键

fix #11922
This commit is contained in:
uye
2025-02-15 11:56:27 +08:00
parent 51f2758f7a
commit 3bd7f05694

View File

@@ -45,6 +45,8 @@ namespace MaaWpfGui.Views.UserControl
// Get modifiers and key data
var modifiers = Keyboard.Modifiers;
bool isWindowsKeyPressed = Keyboard.IsKeyDown(Key.LWin) || Keyboard.IsKeyDown(Key.RWin);
modifiers |= isWindowsKeyPressed ? ModifierKeys.Windows : ModifierKeys.None;
var key = e.Key;
// When Alt is pressed, SystemKey is used instead