Skip to content

Commit 10fa2f7

Browse files
Validate hotkey
1 parent 1defb6a commit 10fa2f7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Flow.Launcher/HotkeyControl.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Flow.Launcher.Infrastructure.Hotkey;
1010
using Flow.Launcher.Plugin;
1111
using System.Threading;
12-
using System.Windows.Interop;
1312

1413
namespace Flow.Launcher
1514
{
@@ -79,7 +78,7 @@ public async Task SetHotkeyAsync(HotkeyModel keyModel, bool triggerValidate = tr
7978

8079
if (triggerValidate)
8180
{
82-
CurrentHotkeyAvailable = CheckHotkeyAvailability();
81+
CurrentHotkeyAvailable = CurrentHotkey.CharKey != Key.None && CheckHotkeyAvailability();
8382
if (!CurrentHotkeyAvailable)
8483
{
8584
tbMsg.Foreground = new SolidColorBrush(Colors.Red);

0 commit comments

Comments
 (0)