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

Ctrl keys are consumed even when they shouldn't #75

Open
zzgab opened this issue Jan 3, 2023 · 0 comments
Open

Ctrl keys are consumed even when they shouldn't #75

zzgab opened this issue Jan 3, 2023 · 0 comments

Comments

@zzgab
Copy link

zzgab commented Jan 3, 2023

If I design keyboard shortcuts for quick access to specific inputs in my GUI, like: Ctrl+N to jump to some given text field, and one <TextInput> currently has the focus, it will use up and display the n letter (although key.ctrl === true, and my other useInput in the app will be invoked and will correctly pass the focus to where I wish, but... too late).

I would suggest an additional prop to <TextInput>: a keyFilter callback, which would receive the input+key (just as useInput) and would return true if the program should absorb (swallow) that key combination, or let it go through to the regular treatment of TextInput.

I can make a PR if someone else thinks this should exit.
Thanks

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

No branches or pull requests

1 participant