I trying to make a code to wait until i press [ or ], where [ make a specific thing and ] make other.
But i can't cuz i need to make both waits in the same time.
import keyboard
import threading
def listener():
keyboard.wait(']')
print('] pressed')
while True:
threading.Thread(target=listener()).start()
keyboard.wait('[')
print('[ pressed')
print('\nLoop\n')
This way the code wait ] and only when i press this key pass to next key [
I want to press any key and return print('key pressed') regardless of the order in which I press