I found that the DeviceEvents Button, Key and MouseWheel do not work in the browser. The only one that fires (as long as the mouse pointer is above the canvas) is MouseMotion.
I am not sure, if this is of any importance, but note that I create the window with:
let window = WindowBuilder::new()
.with_title("Mouse Wheel events")
.with_canvas(Some(canvas))
.build(&event_loop)
.unwrap();
I have a little repro of this over here.
Just check the browser console and compare it with the console output when running on native.
I found that the
DeviceEventsButton,KeyandMouseWheeldo not work in the browser. The only one that fires (as long as the mouse pointer is above the canvas) isMouseMotion.I am not sure, if this is of any importance, but note that I create the
windowwith:I have a little repro of this over here.
Just check the browser console and compare it with the console output when running on native.