Closed hash3liZer closed 3 years ago
Thank you for your report.
Please see the platform limitations for Linux.
To summarise: keyboard listeners on Linux use either X or uinput as backend. Ubuntu 21.04 switched to using Wayland instead of X as display and input server, and the security model of this system is incompatible with input monitors. There exist drafts for protocols adding this support, but as far as I know, none have been accepted by all vendors.
uinput is still an option, but it comes with additional restrictions.
Description I am currently on Ubuntu. Previously, i have done this on Windows and it worked all fine. But on linux the callback simple isn't called when a key is pressed.
Platform and pynput version Worked Fine on: Ubuntu:
21.04
Pynput:1.7.3
To Reproduce The following code is enough to reproduce the bug. It would fine under Windows. But on linux it doesn't fire the
on_release
function: