Skip to main content

useKeyboardListener

Interfaces

KeyboardListenerOutput

Properties

PropertyTypeDescriptionDefined in
cleanup() => voidCleanup function to stop listening and reset states.manager/hooks/useKeyboardListener.ts:16
hasKeybooleanWhether the listened keys contain a valid main key.manager/hooks/useKeyboardListener.ts:14
hasModifierbooleanWhether the listened keys contain a valid modifier.manager/hooks/useKeyboardListener.ts:12
listenedShortcutstring[]The listened keys.manager/hooks/useKeyboardListener.ts:10
listeningToShortcutbooleanWhether the listener is listening.manager/hooks/useKeyboardListener.ts:6
setListeningToShortcutDispatch<SetStateAction<boolean>>Setter for the state of whether the listener is listening.manager/hooks/useKeyboardListener.ts:8

Functions

default()

default(): KeyboardListenerOutput

Hook for listening to keyboard inputs.

Returns

KeyboardListenerOutput

Defined in

manager/hooks/useKeyboardListener.ts:22