mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #2432 from Flow-Launcher/fix-open-result-modifier-key
Ignore modifier key when using key + number to launch result
This commit is contained in:
commit
0660c4c454
2 changed files with 9 additions and 1 deletions
|
|
@ -50,5 +50,12 @@ namespace Flow.Launcher.Plugin
|
|||
(AltPressed ? ModifierKeys.Alt : ModifierKeys.None) |
|
||||
(WinPressed ? ModifierKeys.Windows : ModifierKeys.None);
|
||||
}
|
||||
|
||||
public static readonly SpecialKeyState Default = new () {
|
||||
CtrlPressed = false,
|
||||
ShiftPressed = false,
|
||||
AltPressed = false,
|
||||
WinPressed = false
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,8 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
var hideWindow = await result.ExecuteAsync(new ActionContext
|
||||
{
|
||||
SpecialKeyState = GlobalHotkey.CheckModifiers()
|
||||
// not null means pressing modifier key + number, should ignore the modifier key
|
||||
SpecialKeyState = index is not null ? SpecialKeyState.Default : GlobalHotkey.CheckModifiers()
|
||||
})
|
||||
.ConfigureAwait(false);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue