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

Add char input #804

Closed
wants to merge 2 commits into from
Closed

Add char input #804

wants to merge 2 commits into from

Conversation

Jerald
Copy link
Contributor

@Jerald Jerald commented Nov 6, 2020

Based on the comments and information from #782, this is an alternative approach to providing a form of simple text input in bevy.

This adds the CharInput event to bevy_input and modifies bevy_winit to dispatch the event when the winit ReceivedCharacter event fires.

Only one of either this PR or #805 should realistically be merged.

@karroffel karroffel added C-Feature A new feature, making something new possible A-Input Player input via keyboard, mouse, gamepad, and more labels Nov 6, 2020
@Jerald
Copy link
Contributor Author

Jerald commented Nov 6, 2020

I've now added #805 which is a more window-focused alternative to this approach. I'm leaving both open so the preferred one can be chosen, closing the other one.

@cart
Copy link
Member

cart commented Nov 7, 2020

closed in favor of #805

@stanle-cs
Copy link

@cart I don't know if it's appropriate to ask here, but ran into this issue today. Is there a reason why #805 is favored over #804? I tried to use <ReceivedCharacter> and realized that it is part of the window plugin, so I can't use it with the minimal plugin group. Tried to find something similar to this at a lower level but doesn't look like we have an easy way to get the char from either ScanCode or KeyCode unless I'm mistaken.

@cart
Copy link
Member

cart commented Oct 15, 2023

@stanle-cs Character input pretty much always happens within the context of a window (and on some platforms, must happen in the context of a window). We might later add "windowless input" support for platforms that support it, but that is a corner case to a degree that I'm not sure we should be focusing on right now.

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-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants