Skip to content

Commit 43beef4

Browse files
committed
Use command & parameter for SetGlobalHotkeyWithChefKeys
1 parent d332472 commit 43beef4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Flow.Launcher/Helper/HotKeyMapper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,11 @@ private static void SetGlobalHotkeyWithChefKeys(RegisteredHotkeyData hotkeyData)
345345
}
346346

347347
var hotkeyStr = hotkey.ToString();
348+
var hotkeyCommand = hotkeyData.Command;
349+
var hotkeyCommandParameter = hotkeyData.CommandParameter;
348350
try
349351
{
350-
ChefKeysManager.RegisterHotkey(hotkeyStr, hotkeyStr, OnToggleHotkeyWithChefKeys);
352+
ChefKeysManager.RegisterHotkey(hotkeyStr, hotkeyStr, () => hotkeyCommand.Execute(hotkeyCommandParameter));
351353
ChefKeysManager.Start();
352354
}
353355
catch (Exception e)

0 commit comments

Comments
 (0)