Bind a shortcut.
Call useHotkeys in your component to bind a shortcut to an action. No provider is needed.
import { useHotkeys } from 'react-hotkeys-hook'
function Editor() {
useHotkeys('mod+s', saveDocument, {
preventDefault: true,
})
return <Document />
}