Use command & parameter for SetGlobalHotkeyWithChefKeys

This commit is contained in:
Jack251970 2025-07-02 13:05:28 +08:00
parent d332472693
commit 43beef42b8

View file

@ -345,9 +345,11 @@ internal static class HotKeyMapper
}
var hotkeyStr = hotkey.ToString();
var hotkeyCommand = hotkeyData.Command;
var hotkeyCommandParameter = hotkeyData.CommandParameter;
try
{
ChefKeysManager.RegisterHotkey(hotkeyStr, hotkeyStr, OnToggleHotkeyWithChefKeys);
ChefKeysManager.RegisterHotkey(hotkeyStr, hotkeyStr, () => hotkeyCommand.Execute(hotkeyCommandParameter));
ChefKeysManager.Start();
}
catch (Exception e)