useKeyboardListener
Interfaces
KeyboardListenerOutput
Properties
Property | Type | Description | Defined in |
---|---|---|---|
cleanup | () => void | Cleanup function to stop listening and reset states. | manager/hooks/useKeyboardListener.ts:16 |
hasKey | boolean | Whether the listened keys contain a valid main key. | manager/hooks/useKeyboardListener.ts:14 |
hasModifier | boolean | Whether the listened keys contain a valid modifier. | manager/hooks/useKeyboardListener.ts:12 |
listenedShortcut | string [] | The listened keys. | manager/hooks/useKeyboardListener.ts:10 |
listeningToShortcut | boolean | Whether the listener is listening. | manager/hooks/useKeyboardListener.ts:6 |
setListeningToShortcut | Dispatch <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.