dddice/react-keybind

Sequence timers do not reset after a completed sequence.

Redmega opened this issue · 3 comments

As stated in the title, key sequences seem to only be usable once.

Reproduction example: https://codesandbox.io/embed/react-keybind-sequence-bug-2ujqk

Edit: Seems like this is intentional, actually, in that it waits a full 2000ms before resetting the sequence buffer. In that case, when a sequence is completed, it should be immediately callable again.

For my specific use case, it might be worth simply checking for modifiers of shiftKey, metaKey, ctrlKey, etc.

Thank you for the reproducible example. I agree, we should reset the timer on a completed sequence. Will write a test and fix. 👍

This has been corrected in 0.5.1. Thanks for reporting!