using keyboard version 0.13.5
Windows 10
Python v3.9.7
Using keyboard.send(int) does not work until you call any keyboard.send(str)
It seens that the mapping of the scan_code -> char only happens after the first call of send with a char, then the subsequent calls works fine
import keyboard
keyboard.send(30) # scan code to A, this does not works
keyboard.send((30,)) # scan code to A, this does not works
keyboard.send("b") # this works
keyboard.send(30) # scan code to A, this works
key = keyboard.key_to_scan_codes("a")
print(key) # 30, the scan code to A
keyboard.send(key) # this works
using keyboard version 0.13.5 Windows 10 Python v3.9.7
Using
keyboard.send(int)
does not work until you call anykeyboard.send(str)
It seens that the mapping of the scan_code -> char only happens after the first call of send with a char, then the subsequent calls works fine
Expected
aabaa
Output:baa