Key sequence docs and validation#1260
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
You are absolutely right about the breaking change, I missed that. I think a better fix would be to check if a single |
I may be misunderstanding this suggestion. If As far as I know, the validation logic that I introduced ( |
|
You're right. I would suggest a double check: After the delimiter split a string cannot contain both the `hotkey "${hotkey}" contains both "${delimiter}" as delimiter key and "${sequenceSplitKey}" as sequence split key` |
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.