Device events stopped working on Linux #4483
Replies: 1 comment 2 replies
-
|
Update: I can confirm this is due to Wayland. Specifically, it doesn't support device events except for mouse motion; this is consistent with my observation. I confirmed by launching Ubuntu in X11 mode; problem went away. For anyone who runs into this: There are two workarounds. A: Insert this at the top of your application's B: Use Window Events instead of Device events for everything except mouse movement. Winit is gracious enough to expose the same key, button etc types, so you can abstract the handling out into functions that depend on these, then feed them from either device or window event handlers. Above: practical solutions. Now: Wayland, this sucks. Linux distro maintainers: Avoid Wayland for this and other reasons. The OS should be a smooth mediator between hardware and software; not a friction generator. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I have an odd question. Did Button and Key events stop working on linux within the past 6 months. My engine and application I mainly develop on Windows, but occasionally test on Linux. So far, other than the left and right mouse keys between swapped identifiers, it's transparent.
I just tried on linux (Ubuntu, 24) again, and the only Device Events its receiving are mouse motion. No keys, mouse buttons, or scrolling.
The only thing I can find is maybe DeviceEvents don't work on Wayland, which is a GUI backend for Linux, and my Linux machine was changed from X11 to Wayland from a system update?
Does this sound right? Or is it something else? How would you fix it? Ty!
Beta Was this translation helpful? Give feedback.
All reactions