From 64cf1ed1303c14ad9e9dd410ac3536fa1a7ee36c Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 12 Jul 2025 15:22:27 +0800 Subject: [PATCH] Fix IsActionContextEvent logic --- Flow.Launcher/Helper/HotKeyMapper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/Helper/HotKeyMapper.cs b/Flow.Launcher/Helper/HotKeyMapper.cs index 6082f4b28..aa48142d9 100644 --- a/Flow.Launcher/Helper/HotKeyMapper.cs +++ b/Flow.Launcher/Helper/HotKeyMapper.cs @@ -752,9 +752,9 @@ internal static class HotKeyMapper private static bool IsActionContextEvent(KeyBinding existingBinding, HotkeyModel hotkey) { // Check if this hotkey is a hotkey for ActionContext events - if (!_actionContextHotkeyEvents.ContainsKey(hotkey) && - _actionContextHotkeyEvents[hotkey].Command == existingBinding.Command && - _actionContextHotkeyEvents[hotkey].Parameter == existingBinding.CommandParameter) + if (_actionContextHotkeyEvents.TryGetValue(hotkey, out var value) && + value.Command == existingBinding.Command && + value.Parameter == existingBinding.CommandParameter) { // If the hotkey is not for ActionContext events, return false return true;