Closed Cvaniak closed 1 year ago
Thank you for your report.
Do you by any chance run a Wayland session? When doing so, applications running under Xwayland work, but not applications running under pure Wayland.
Hi!
Thank you for quick response.
I have seen Wayland
word multiple times looking for solutions, but I was almost sure that it is not my case (but I did not know what it is and from context I thought it is another distro).
After more research I found that this problem was already mentioned #189 .
As then for future users: Manjaro and Ubuntu in some cases switched from X11 to Wayland. You can check if you are running Wayland by:
echo $XDG_SESSION_TYPE
And if it says wayland
it means that you can encounter problem like in linked issue.
Best solution so far I found is to start new terminal session like:
export WAYLAND_DISPLAY=unset
# run you emulator
terminator # In this window pynput should work
# to finalize
unset WAYLAND_DISPLAY
You can also install xterm
and running app via this window.
Description
When I run Monitor Keyboard or any other code with
pynput
it does not work in main workspace. It does register all events when I move to another.How ever it also sometimes register events when I unfocus terminal to another app (but it needs to be another app than terminal) in the same workspace.
Platform and pynput version
1.7.6
and1.6.0
and1.5.2
(tested just few)3.10.10
,3.10.8
,3.9.16
,3.9.4
,3.7.6
(just few random, including ones that works on long running manjaro)To Reproduce
I had problem after fresh Manjaro install. First it was from old image on USB then upgraded to newest version. I tested on non-upgraded from USB and the same problem appeared. Same for fresh downloaded Manjaro today.
After OS install (or booting from USB) I install
pip
and then create venvpython3 -m venv venv
and installpynput
with that I run example with Monitoring Keyboard.Other
keyboard
,blessed
,urwid
and it works fine