Open stepheneb opened 1 year ago
Thank you for your report.
Could it be that the update included pyobjc? I unfortunately no longer have access to a macOS system, but I think some version of pyobjc is included with some Apple product. You can check this by importing Quartz
in your script and checking its __file__
attribute. It should come from your virtualenv.
Description This morning I was using
keyboard.Listener
in a small python program and everything worked. I upgraded to the latest xcode (Version 15.0 (15A240d) and let it finishing installing new frameworks for ios and macos development and key presses no longer get to the listener, instead they are echoed to the console.I also restarted the computer after installing xcode -- so it's possible Apple applied one of it's invisible security updates. I have those enabled. Actual OS updates have to ask me.
Am very curious if this issue arises for anybody else.
Platform and pynput version Your operating system and version, and the version of pynput.
macos 13.5.2, pynput 1.7.6, python 3.11.5
To Reproduce If possible, please include a short standalone code sample that reproduces the bug. Remember to surround it with code block markers to maintain indentation!
Code sample extracted from larger program:
This morning it worked fine.
Now pressing the left and right arrow keys and
Enter
results in output like this and I have to pressctrl-C
to quit the program.Steps that didn't work:
Added the following Python to Security and Preferences list of programs that have access to Accessibility features (this is the Python that is running when the simple-keyboard program is running):
Running with
sudo
:Removing
suppress=True
makes no difference in the results.