is there any way to make keyboard input from my program. suppose my program reeives "1" from a socket. how this data can be converted to a real time keyboard hit. means when "1" would receive , the computer would think that i pressed "1" .
In Windows, you can use pywin32 to make a keypress. See this previous answer for a code example.
In Linux, this previous answer has you covered, using xsendkey or xsendkeycode
And for Macs, another previous answer using PyQt or wxPython.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With