Skip to content

Commit b096944

Browse files
Add to modifier keys
1 parent 9e5e213 commit b096944

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Flow.Launcher.Plugin/ActionContext.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace Flow.Launcher.Plugin
1+
using System.Windows.Input;
2+
3+
namespace Flow.Launcher.Plugin
24
{
35
public class ActionContext
46
{
@@ -11,5 +13,13 @@ public class SpecialKeyState
1113
public bool ShiftPressed { get; set; }
1214
public bool AltPressed { get; set; }
1315
public bool WinPressed { get; set; }
16+
17+
public ModifierKeys ToModifierKeys()
18+
{
19+
return (CtrlPressed ? ModifierKeys.Control : ModifierKeys.None) |
20+
(ShiftPressed ? ModifierKeys.Shift : ModifierKeys.None) |
21+
(AltPressed ? ModifierKeys.Alt : ModifierKeys.None) |
22+
(WinPressed ? ModifierKeys.Windows : ModifierKeys.None);
23+
}
1424
}
15-
}
25+
}

0 commit comments

Comments
 (0)