Open CyberYoda05 opened 1 year ago
No, but you need to keep the program running.
keyboard.add_hotkey("m",lambda : print("M pressed")) while True: time.sleep(10000) # -> without this it will simply close the program.
keyboard.add_hotkey("m",lambda : print("M pressed")) time.sleep(1000) # -> now the program will stop after 1000 seconds
No, but you need to keep the program running.
this works as well