diff --git a/src/useRecordHotkeys.ts b/src/useRecordHotkeys.ts index d66296e8..7449d759 100644 --- a/src/useRecordHotkeys.ts +++ b/src/useRecordHotkeys.ts @@ -43,5 +43,9 @@ export default function useRecordHotkeys() { } }, [handler, stop]) - return [keys, { start, stop, isRecording }] as const + const resetKeys = useCallback(() => { + setKeys(new Set()) + }, []) + + return [keys, { start, stop, resetKeys, isRecording }] as const }