import { useState } from 'react' ; import useKeyDownCallback from './useKeyDownCallback' ; export default function useKeyDown ( combo ) { const [ state , setState ] = useState ( false ) ; useKeyDownCallback ( combo , ( { down } ) => { setState ( down ) ; } ) ; return state ; }