import React from 'react' import {useDialogStateContext} from '#/state/dialogs' import {useLightbox} from '#/state/lightbox' import {useModals} from '#/state/modals' import {useIsDrawerOpen} from '#/state/shell/drawer-open' import {useComposerControls} from './' /** * Based on {@link https://github.com/jaywcjlove/hotkeys-js/blob/b0038773f3b902574f22af747f3bb003a850f1da/src/index.js#L51C1-L64C2} */ function shouldIgnore(event: KeyboardEvent) { const target: any = event.target || event.srcElement if (!target) return false const {tagName} = target if (!tagName) return false const isInput = tagName === 'INPUT' && ![ 'checkbox', 'radio', 'range', 'button', 'file', 'reset', 'submit', 'color', ].includes(target.type) // ignore: isContentEditable === 'true', and