diff --git a/components/ExportMenu.js b/components/ExportMenu.js index d2fb278..eb7a4f1 100644 --- a/components/ExportMenu.js +++ b/components/ExportMenu.js @@ -1,6 +1,6 @@ import React from 'react' import { withRouter } from 'next/router' -import { useCopyTextHandler, useOnline } from '@dawnlabs/tacklebox' +import { useCopyTextHandler, useOnline, useKeyboardListener } from '@dawnlabs/tacklebox' import { COLORS, EXPORT_SIZES } from '../lib/constants' import Button from './Button' @@ -69,6 +69,12 @@ function ExportMenu({ const online = useOnline() const isSafari = useSafari() + useKeyboardListener('e', e => { + if (e.shiftKey && e.metaKey) { + exportImage() + } + }) + const disablePNG = isSafari && (tooLarge || !online) const input = React.useRef()