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

Enter key treated as character E when Window::prevent_default_event_handling is false #7791

Open
johanhelsing opened this issue Feb 23, 2023 · 1 comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds S-Blocked This cannot move forward until something else changes

Comments

@johanhelsing
Copy link
Contributor

johanhelsing commented Feb 23, 2023

Bevy version

main: 52f0617, a060639

Relevant system information

  • wasm, windows, firefox 110.0

What you did

  1. Set Window::prevent_default_event_handling to false
  2. Add logging for EventReader<ReceivedCharacter>
  3. cargo run --target wasm32-unknown-unknown
  4. Open browser
  5. Press enter key
  6. 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: rust-windowing/winit#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.

@johanhelsing johanhelsing added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 23, 2023
@mockersf mockersf added A-Input Player input via keyboard, mouse, gamepad, and more A-Windowing Platform-agnostic interface layer to run your app in O-Web Specific to web (WASM) builds S-Blocked This cannot move forward until something else changes and removed S-Needs-Triage This issue needs to be labelled labels Feb 23, 2023
@benfrankel
Copy link
Contributor

The winit issue says it's fixed. Can this be closed?

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 A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Web Specific to web (WASM) builds S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

3 participants