Reputation: 1
import keyboard
if keyboard.is_pressed('a'):
print('key pressed')
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Upvotes: 0
Views: 48
Reputation: 89
According to your limited information, the problem is about thread, not keyboard, so please check the complete traceback to see what's wrong with this thread.
Upvotes: 1