@@ -65,21 +65,21 @@ class HotKeyManager {
65
65
66
66
if (keyEvent is KeyDownEvent ) {
67
67
final physicalKeysPressed = HardwareKeyboard .instance.physicalKeysPressed;
68
- HotKey ? hotKey = _hotKeyList.firstWhereOrNull (
69
- (e) {
70
- List < HotKeyModifier > modifiers = HotKeyModifier .values
71
- . where ((e) => e.physicalKeys. any (physicalKeysPressed.contains))
72
- . toList ();
73
- return e.scope == HotKeyScope .inapp &&
74
- keyEvent.logicalKey == e.logicalKey &&
75
- modifiers.length == ( e.modifiers? .length ?? 0 ) &&
76
- modifiers. every ((e.modifiers ?? []).contains );
77
- },
78
- );
79
- if (hotKey != null ) {
80
- HotKeyHandler ? handler = _keyDownHandlerMap[ hotKey.identifier] ;
81
- if (handler != null ) handler (hotKey);
82
- _lastPressedHotKey = hotKey ;
68
+ final hotKeys = _hotKeyList.where ((e) {
69
+ List < HotKeyModifier > modifiers = HotKeyModifier .values
70
+ . where ((e) => e.physicalKeys. any (physicalKeysPressed.contains))
71
+ . toList ();
72
+ return e.scope == HotKeyScope .inapp &&
73
+ keyEvent.logicalKey == e.logicalKey &&
74
+ modifiers.length == (e.modifiers ? .length ?? 0 ) &&
75
+ modifiers.every (( e.modifiers ?? []).contains);
76
+ } );
77
+ if (hotKeys.isNotEmpty) {
78
+ for ( final hotKey in hotKeys) {
79
+ HotKeyHandler ? handler = _keyDownHandlerMap[hotKey.identifier];
80
+ if ( handler != null ) handler ( hotKey) ;
81
+ }
82
+ _lastPressedHotKey = hotKeys.last ;
83
83
return true ;
84
84
}
85
85
}
0 commit comments