File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
packages/react-grab/src/utils Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,17 @@ export const isTargetKeyCombination = (
5252 ) ;
5353 }
5454
55- const keyMatches =
56- event . key ?. toLowerCase ( ) === key . toLowerCase ( ) ||
57- keyMatchesCode ( key , event . code ) ;
58- const hasModifier = metaKey || ctrlKey || shiftKey || altKey ;
59- const modifiersMatch = hasModifier
60- ? ( metaKey ? event . metaKey : true ) &&
61- ( ctrlKey ? event . ctrlKey : true ) &&
62- ( shiftKey ? event . shiftKey : true ) &&
63- ( altKey ? event . altKey : true )
64- : event . metaKey || event . ctrlKey ;
65- return keyMatches && modifiersMatch ;
55+ const keyMatches =
56+ event . key ?. toLowerCase ( ) === key . toLowerCase ( ) ||
57+ keyMatchesCode ( key , event . code ) ;
58+ const hasModifier = metaKey || ctrlKey || shiftKey || altKey ;
59+ const modifiersMatch = hasModifier
60+ ? ( metaKey ? event . metaKey : true ) &&
61+ ( ctrlKey ? event . ctrlKey : true ) &&
62+ ( shiftKey ? event . shiftKey : true ) &&
63+ ( altKey ? event . altKey : true )
64+ : ! event . metaKey && ! event . ctrlKey && ! event . shiftKey && ! event . altKey ;
65+ return keyMatches && modifiersMatch ;
6666 }
6767
6868 const hasOnlyMetaOrCtrl =
You can’t perform that action at this time.
0 commit comments