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

Improve docs for ReceivedCharacter #12040

Closed
rparrett opened this issue Feb 22, 2024 · 1 comment
Closed

Improve docs for ReceivedCharacter #12040

rparrett opened this issue Feb 22, 2024 · 1 comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Docs An addition or correction to our documentation

Comments

@rparrett
Copy link
Contributor

rparrett commented Feb 22, 2024

How can Bevy's documentation be improved?

Since #10702, ReceivedCharacter now contains SmolStr, which is a bit confusing. Is it a character or multiple characters?

The winit docs for the underlying winit event that populates this have some info about why it is not a char and what else might be in there. (but surely this isn't a str just for stray deadkeys, right? we should look into what locales or settings or whatever would produce multiple chars.)

ReceivedCharacter is also not consistent cross-platform in other important ways. See rust-windowing/winit#3381.

We might also want to point users to an alternative: KeyEvent::logical_key which is more consistent across platforms and is in a unified event stream with other keyboard events, which is important if you are developing a text input.

@rparrett rparrett added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled A-Input Player input via keyboard, mouse, gamepad, and more and removed S-Needs-Triage This issue needs to be labelled labels Feb 22, 2024
@james7132
Copy link
Member

Closing as the type is to be deprecated and removed: #12639.

@james7132 james7132 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Docs An addition or correction to our documentation
Projects
None yet
Development

No branches or pull requests

2 participants