Key sequence docs and validation #1260
Open
+30
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After upgrading to 5.1.0, my
>
hotkey stopped working, because of the new sequential combo feature (#1247). (So, ideally, the sequential combo feature should have been marked as a breaking change; oh well.)Here are some suggestions for improving this:
>
is parsed as a sequence of['', '']
, which indicates a problem.) I'd appreciate a review of my validation logic here, to make sure there aren't any valid use cases that trigger my logic, but it at least doesn't trigger on any of the automated tests.I have not added a test for the new validation check. If you'd like for me to do that, please let me know.
Within the updated documentation, I'm using relative links rather than absolute links, to help the docs work better whenever 6.x is released and 5.x is moved to https://react-hotkeys-hook.vercel.app/docs/4.x/. Please let me know if you'd like for me to update other links to be relative or if you'd rather I'd use absolute links.
It occurred to me that react-hotkeys-hook could probably assume that any standalone delimiter, splitKey, or sequenceSplitKey could be treated as a literal - but "magic" behavior of that sort may cause more problems that it solves.