I'm trying to run some code from someone else's GitHub repo, but it wouldn't work. Eventually I figured out that the issue lies at the add_hotkey function, which that project imports from this module. The function never fires on my PC (W10).
I wrote this small test script to isolate the issue:
The write function works perfectly fine, but all methods of binding a function to a key fails to execute when entering the required input. I ran the exact same code on my laptop (Linux Mint) and it ran perfectly fine. By the way, I also tried "while True: time.sleep(0.1)" instead of "keyboard.wait()", but that yielded the exact same results on both machines, Linux working fine and W10 not so much. I also tried to run this code on a Linux VM on my PC and the code worked perfectly fine, so this must have something to do with my instance of Windows and isn't some weird (physical) keyboard issue or anything of the sort.
I'm trying to run some code from someone else's GitHub repo, but it wouldn't work. Eventually I figured out that the issue lies at the add_hotkey function, which that project imports from this module. The function never fires on my PC (W10).
I wrote this small test script to isolate the issue:
The write function works perfectly fine, but all methods of binding a function to a key fails to execute when entering the required input. I ran the exact same code on my laptop (Linux Mint) and it ran perfectly fine. By the way, I also tried "while True: time.sleep(0.1)" instead of "keyboard.wait()", but that yielded the exact same results on both machines, Linux working fine and W10 not so much. I also tried to run this code on a Linux VM on my PC and the code worked perfectly fine, so this must have something to do with my instance of Windows and isn't some weird (physical) keyboard issue or anything of the sort.