File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Flow.Launcher.Infrastructure/Hotkey Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Linq ;
4
4
using System . Windows . Input ;
5
+ using System . Windows . Navigation ;
5
6
6
7
namespace Flow . Launcher . Infrastructure . Hotkey
7
8
{
@@ -148,7 +149,7 @@ public override string ToString()
148
149
return string . Join ( " + " , keys ) ;
149
150
}
150
151
151
- private static bool ValidateHotkey ( Key key )
152
+ private bool ValidateHotkey ( Key key )
152
153
{
153
154
HashSet < Key > invalidKeys = new ( )
154
155
{
@@ -158,7 +159,15 @@ private static bool ValidateHotkey(Key key)
158
159
Key . LWin , Key . RWin ,
159
160
} ;
160
161
161
- return ! invalidKeys . Contains ( key ) ;
162
+ if ( invalidKeys . Contains ( key ) )
163
+ {
164
+ return false ;
165
+ }
166
+ if ( ModifierKeys == ModifierKeys . None )
167
+ {
168
+ return key >= Key . F1 && key <= Key . F24 ;
169
+ }
170
+ return true ;
162
171
}
163
172
164
173
public override bool Equals ( object obj )
You can’t perform that action at this time.
0 commit comments