-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add non-portable keys to egui::Key #3303
Comments
I was actually coming here to open the same issue in order to frontload a few project ideas I've had, since I need accessibility and Egui is one of the only crates with that. My two use cases:
Looking at this, it seems we're down at least 9 common keys, namely all punctuation. And though it doesn't matter to me being as it isn't portable even in English layouts, we're also probably down the numpad too. |
Will be closed by #3649 |
Currently, the documentation for
egui::Key
reads:I think this is an unfortunate restriction for the case of wanting to develop an app for a limited audience with a known keyboard. I want to be able to assign features to e.g. the
/
key on my North American keyboard layout to focus to a search bar. I'm unable to, it seems to be implied, because not all keyboard layouts have a slash key. I really appreciate placing portability first but I think the available keys on my actual keyboard should at least come second.To this end, would it be acceptable to have an API to detect whether any key is physically present? Non-portable keys could be found and queried this way, but non-portable keys should also be included in e.g. the
events
field ofegui::RawInput
so that they can be acted on in the same way as existing keys. Appropriate naming and requiring at least some extra typing on the programmer's part would make them think about why they're using non-portable keys and what it means for their audience.If this approach sounds reasonable, I could try and put in some time to prototype these changes.
Related: #3266
Thanks by the way for this wonderful project! I've really been enjoying it
The text was updated successfully, but these errors were encountered: