This example:
Using python 3.11.2 on Debian 12 in a venv.
What am I doing wrong?
Also, where are the code tags?
Thanks,
JP.
import keyboard # using module keyboard
import time
while True: # making a loop
try: # used try so that if user pressed other than the given key error will not be shown
if keyboard.is_pressed('q'): # if key 'q' is pressed
print('You Pressed A Key!')
break # finishing the loop
except:
time.sleep(2)
print('xxxxxx!')won't capture any keyboard input. Eg. console output:Output:xxxxxx!
xxxxxx!
xxxxxx!
xxxxxx!
xxxxxx!
qqqxxxxxx!
qqqqxxxxxx!
qqqqqxxxxxx!
qqqqqqqqqxxxxxx!
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqxxxxxx!
qqqqqqqqqqxxxxxx!
xxxxxx!
xxxxxx!I tried using opencv waitKey and had the same behavior. I tried it on a different computer with same result.Using python 3.11.2 on Debian 12 in a venv.
What am I doing wrong?
Also, where are the code tags?
Thanks,
JP.
