diff --git a/packages/hotkey_manager/lib/src/hotkey_manager.dart b/packages/hotkey_manager/lib/src/hotkey_manager.dart index 6e97224..e3aa17b 100644 --- a/packages/hotkey_manager/lib/src/hotkey_manager.dart +++ b/packages/hotkey_manager/lib/src/hotkey_manager.dart @@ -67,11 +67,12 @@ class HotKeyManager { final physicalKeysPressed = HardwareKeyboard.instance.physicalKeysPressed; HotKey? hotKey = _hotKeyList.firstWhereOrNull( (e) { - List? modifiers = HotKeyModifier.values + List modifiers = HotKeyModifier.values .where((e) => e.physicalKeys.any(physicalKeysPressed.contains)) .toList(); return e.scope == HotKeyScope.inapp && keyEvent.logicalKey == e.logicalKey && + modifiers.length == (e.modifiers?.length ?? 0) && modifiers.every((e.modifiers ?? []).contains); }, );