moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.73k stars 243 forks source link

Bug on Linux: Windows (Super) + D doesn't work #556

Open ElectricRCAircraftGuy opened 1 year ago

ElectricRCAircraftGuy commented 1 year ago

See here: I can't figure this out: Stack Overflow: pynput library not working as expected in Python to press Windows + D key

pip install pynput shows I have version 1.7.6.

ElectricRCAircraftGuy commented 1 year ago

Looking at tbe proposed solution in the answer at the link above, I think this is a bug in pynput on Linux, since I am running that code on Linux in the X11 window manager, and it is not working.

Note that ydotool does work on both X11 and Wayland. I will come back here and provide an example later, so it might be good to make pynput use ydotool under the hood so that key press functionality can fully work on both X11 and Wayland in Linux.

ElectricRCAircraftGuy commented 1 year ago

See all the things I've tried in my answer here: https://stackoverflow.com/a/76544123/4561887

Super + D fails, Ctrl + Super + D fails, Ctrl + Alt + D fails, when run in pynput.

Each of those works when manually pressed on my keyboard, however.