-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
DS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)
Description
https://github.com/rust-windowing/winit/blob/master/src/platform_impl/web/web_sys/event.rs considers event.key_code()/event.char_code() to be the scan_code of the KeyboardInput event and event.code() to be the virtual_key_code of the KeyboardInput event while it should be the other way around.
How to verify yourself: Use the links given below and a German keyboard layout and press the German z key
event.key_code()/event.char_code()will return 122 (the ASCII ofz) i.e. the virtual meaning of the keyevent.code()will returnKeyYi.e. the physical key location
Demonstration of workaround in my personal project: Woyten/tune@38b7ecd and Woyten/tune@fcec2d3
Metadata
Metadata
Assignees
Labels
DS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)