I'm using winit in the Browser on Windows with Wasm. Every time I hit the ALT-GR key on my German keyboard layout, winit sends a control key press first and then an ALT-GR key press.
A comment in another issue hints to winit already handling this as a special case on native windows so likely the same heuristic needs to be used in Wasm:
#3012 (comment)
Winit: KeyEvent { physical_key: Code(ControlLeft), logical_key: Named(Control), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra } slint_lsp_wasm.js:1220:21
Winit: KeyEvent { physical_key: Code(AltRight), logical_key: Named(AltGraph), text: None, location: Right, state: Pressed, repeat: false, platform_specific: KeyEventExtra } slint_lsp_wasm.js:1220:21
Winit: KeyEvent { physical_key: Code(ControlLeft), logical_key: Named(Control), text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra } slint_lsp_wasm.js:1220:21
Winit: KeyEvent { physical_key: Code(AltRight), logical_key: Named(AltGraph), text: None, location: Right, state: Released, repeat: false, platform_specific: KeyEventExtra } slint_lsp_wasm.js:1220:21
Description
I'm using winit in the Browser on Windows with Wasm. Every time I hit the ALT-GR key on my German keyboard layout, winit sends a control key press first and then an ALT-GR key press.
A comment in another issue hints to winit already handling this as a special case on native windows so likely the same heuristic needs to be used in Wasm:
#3012 (comment)
Log Output
Occurs when pressing and releasing AltGr (Only logging KeyEvents for brevity)
Windows version
Winit version
0.30.2