Use Key Capture
DemoDocsPropsProps

Props

keyData

It will be the most used props from useKeyCapture. It gives the key/key varient/key combinations pressed.

PropertyType
keyString
isEnterBoolean
isBackspaceBoolean
isEscapeBoolean
isCapsLockBoolean
isTabBoolean
isSpaceBoolean
isArrowBoolean
isArrowRightBoolean
isArrowLeftBoolean
isArrowUpBoolean
isArrowDownBoolean
isWithShiftBoolean
isWithCtrlBoolean
isWithMetaBoolean
isWithAltBoolean
isCapsBoolean
isSmallBoolean
isNumberBoolean
isSpecialCharacterBoolean

getTargetProps

type: function({})

A prop getter to be given if a target (input, textarea) have to be listened for key-press.

resetKeyData

type: function({})

It will reset all the values in keyData props to the initial values.