mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add to modifier keys
This commit is contained in:
parent
9e5e2135f0
commit
b096944ba1
1 changed files with 12 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
|||
namespace Flow.Launcher.Plugin
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Flow.Launcher.Plugin
|
||||
{
|
||||
public class ActionContext
|
||||
{
|
||||
|
|
@ -11,5 +13,13 @@
|
|||
public bool ShiftPressed { get; set; }
|
||||
public bool AltPressed { get; set; }
|
||||
public bool WinPressed { get; set; }
|
||||
|
||||
public ModifierKeys ToModifierKeys()
|
||||
{
|
||||
return (CtrlPressed ? ModifierKeys.Control : ModifierKeys.None) |
|
||||
(ShiftPressed ? ModifierKeys.Shift : ModifierKeys.None) |
|
||||
(AltPressed ? ModifierKeys.Alt : ModifierKeys.None) |
|
||||
(WinPressed ? ModifierKeys.Windows : ModifierKeys.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue