Skip to content

Commit

Permalink
Merge pull request #1129 from MrMouthOG/feature/resetKeysWhenRecording
Browse files Browse the repository at this point in the history
Added clean keys while recording
  • Loading branch information
JohannesKlauss authored Jan 31, 2024
2 parents 33c02ff + af0d366 commit 890e39a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/useRecordHotkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@ export default function useRecordHotkeys() {
}
}, [handler, stop])

return [keys, { start, stop, isRecording }] as const
const resetKeys = useCallback(() => {
setKeys(new Set<string>())
}, [])

return [keys, { start, stop, resetKeys, isRecording }] as const
}

0 comments on commit 890e39a

Please sign in to comment.