Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework parsing keyboard input in useInput #576

Merged
merged 2 commits into from
Apr 1, 2023
Merged

Conversation

vadimdemedes
Copy link
Owner

@vadimdemedes vadimdemedes commented Apr 1, 2023

Fixes #409.

After working several days on figuring out and fixing all of the input parsing issues in useInput, I realized I'm just patching holes all the time and not really sure if I'm introducing more bugs with each change.

So I bailed on this and decided to copy the code from enquirer, which I believe adapted it from keypress, which extracted it from Node.js itself.

I disabled linter on src/parse-keypress.ts to avoid fixing a lot of the issues it reported, which would make it harder to merge upstream changes.

@vadimdemedes vadimdemedes changed the title Rework parsing input in useInput Rework parsing keyboard input in useInput Apr 1, 2023
@vadimdemedes vadimdemedes merged commit 6f99ca3 into master Apr 1, 2023
@vadimdemedes vadimdemedes deleted the smashing-hawkins-lab branch April 1, 2023 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useInput doesn't detect CTRL + arrow key
1 participant