diff --git a/Flow.Launcher.Plugin/ActionContext.cs b/Flow.Launcher.Plugin/ActionContext.cs index b9e499d2b..d898972da 100644 --- a/Flow.Launcher.Plugin/ActionContext.cs +++ b/Flow.Launcher.Plugin/ActionContext.cs @@ -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); + } } -} \ No newline at end of file +}