(shortcut, e)
| 185 | const shortcutsRef = useRef(shortcuts); |
| 186 | |
| 187 | const matchFound = (shortcut, e)=>{ |
| 188 | if(!shortcut) return false; |
| 189 | let keyCode = getCode(e); |
| 190 | const ctrlKey = (isMac() && shortcut.ctrl_is_meta) ? e.metaKey : e.ctrlKey; |
| 191 | |
| 192 | return Boolean(shortcut.alt) == e.altKey && |
| 193 | Boolean(shortcut.shift) == e.shiftKey && |
| 194 | Boolean(shortcut.control) == ctrlKey && |
| 195 | shortcut.key.key_code == keyCode; |
| 196 | }; |
| 197 | |
| 198 | useEffect(()=>{ |
| 199 | let ele = eleRef.current ?? document; |