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

Non-qwerty keyboard layout has a wrong behaviour on wasm #169

Open
Vrixyz opened this issue Mar 28, 2023 · 3 comments
Open

Non-qwerty keyboard layout has a wrong behaviour on wasm #169

Vrixyz opened this issue Mar 28, 2023 · 3 comments

Comments

@Vrixyz
Copy link
Contributor

Vrixyz commented Mar 28, 2023

follow up on #149 ; we decided to contain the fix on windows, as mac/linux might not be impacted, but we didn't think about wasm.

Unrelated

ctrl-V is broken too on wasm both on windows and mac, not sure it's related.

@vladbat00
Copy link
Owner

vladbat00 commented Mar 28, 2023

This might be related to #113. Can you try setting the following flag to false and see if it works?
https://docs.rs/bevy/0.10.0/bevy/window/struct.Window.html#structfield.prevent_default_event_handling

@Vrixyz
Copy link
Contributor Author

Vrixyz commented Mar 29, 2023

@Vrixyz
Copy link
Contributor Author

Vrixyz commented Mar 29, 2023

More infos on this for ctrl-A, it's actually sending the keys from Qwerty keyboard, therefore sending "ctrl-Q".
If I input ctrl-Q from my keyboard, it works because it's sending "ctrl-A" under the hood 🎉.

But I'd like to work with correct inputs 🤔, also it doesn't help with @.

I've modified bevy_egui main locally to include some logs:

Here is a short wasm log of me spamming ctrl-A

image

Here is a short wasm log of me spamming A:

image

short log of me spamming altgr-0 to try to get my @

image

    • for reference, a short log of me spamming altgr-0 on NATIVE, getting correct behaviour, printing a '@'

      image

  • Looks like the fix for ctrl-A is up to winit, as Keycode is supposed to be the correct key translated in selected layout.

    The fix for @ might be unrelated, I'm not sure.

    @Vrixyz Vrixyz changed the title altgr failing on wasm AZERTY wrong behaviour on wasm Mar 30, 2023
    @Vrixyz Vrixyz changed the title AZERTY wrong behaviour on wasm Non-qwerty keyboard layout has a wrong behaviour on wasm Mar 30, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants