bevy
bevy copied to clipboard
Enter key treated as character E when `Window::prevent_default_event_handling` is `false`
Bevy version
main: 52f06175, a060639
Relevant system information
- wasm, windows, firefox 110.0
What you did
- Set
Window::prevent_default_event_handlingtofalse - Add logging for
EventReader<ReceivedCharacter> cargo run --target wasm32-unknown-unknown- Open browser
- Press enter key
- Open console log
INFO examples/input/keyboard_input_events.rs:35 ReceivedCharacter { window: 0v0, char: 'E' }
https://github.com/bevyengine/bevy/compare/main...johanhelsing:bevy:received-character-e-main?expand=1
What went wrong
Enter gets treated as the character E. We should not get ReceivedCharacter events when enter is pressed.
Additional information
This is a bug in winit. I've submitted a PR here: https://github.com/rust-windowing/winit/pull/2673
Not really sure if there's anything we could/should do to work around it. Creating an issue mostly to track this, and alert people that this is something already investigated in case it doesn't make it in time for bevy 0.10.
The winit issue says it's fixed. Can this be closed?