Floyd
Floyd

Reputation: 1

why do i get this error message when i'm just trying to detect a keypress?

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

Answers (1)

Sean
Sean

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

Related Questions