Closed ElectricRCAircraftGuy closed 1 year ago
Note: to switch between the X11 and Wayland window managers in Linux Ubuntu, see the "To use the X11 Window Manager in Ubuntu 20.04, 22.04, etc." section of my answer here: https://askubuntu.com/a/1109490/327339.
In short, log out, click your name, click the gear in the bottom-right, choose the X11 or Wayland window manager option.
I also mention that here: https://askubuntu.com/a/1470563/327339
Thank you for your report.
This is a known issue, please see the documentation. In short, the security model of Wayland prevents this library from working, but you will notice partial support for applications running under XWayland, the X emulator. Notable examples of such applications are browsers derived from Chromium.
Description See below.
Platform and pynput version Ubuntu 22.04.2--brand new install. How do I check the
pynput
library version? I don't know how to do that.Update:
pip install pynput
seems to show I have 1.7.6:To Reproduce
Originally posted here: https://github.com/albertz/mouse-scroll-wheel-acceleration-userspace/issues/8#issuecomment-1575389079
pynput
works only partially in WaylandI just confirmed there is also a problem with
pynput
. When running the Wayland window manager on Ubuntu 22.04,pynput
can detect scroll wheel movements in Chrome just fine, but not in other programs such as the gnome-terminal, or Sublime Text.Here is a small Python test program I just wrote:
And here is some sample output, which only prints a line when scrolling in Chrome, but not in my terminal nor in Sublime Text:
but it works fully in X11
But in the X11 Window manager, it works fully. My same program above is able to detect mouse scroll wheel movements in all programs, including Chrome, the terminal it's running in, Sublime Text, etc. That's a big difference and definitely a problem in Wayland!