Open FlamingKetchup opened 3 years ago
This seems to be an issue with adding a hotkey for the numerical string. For example, removing keyboard.add_hotkey("left", print, args=["Left was pressed"])
has the same issue of outputting Four was pressed
when pressing left arrow.
Yes, I used the function keyboard.press('left') to press "left arrow".But in fact,it pressed "num 4" ranther than the arrow.
Using a numerical string i.e.
"4"
or even"num 4"
withadd_hotkey
also hooks the scan code (In this case, left arrow). If you have hook both the number and the key with corresponding scan code, pressing the latter will also run the former.Output when pressing 4 (expected behavior):
Output when pressing left arrow: