Skip to content

Improve docs for ReceivedCharacter #12040

Description

@rparrett

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreC-DocsAn addition or correction to our documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions