You can use a remote IP-based KVM to generate keystrokes on another machine in real time.
Simply connect up the KVM's keyboard (and optionally the video and mouse) to the computer you want to send remote keystrokes to.
You then connect to the IP on the KVM via your web browser or the provided native system app, and send whatever keystrokes you wish.
One such product is Tripp Lite's Server Remote Control, External KVM over IP and another is the Lantronix Spider KVM
Alternatively, you can rebuild a DIY version of one of these with only keyboard support (rather than keyboard, video, and mouse support) using a Teensy USB Dev Board connected to a WIZ712MJ ethernet module with the WIZ812 Ethernet Adaptor Kit
At that point you could use the Teensy's ethernet and keyboard libraries to write a small program that spawns a server using Server.begin()
, waits for a connection, and then has an infinite while loop with something like the following content to create a one-way network echo server:
if (myclient.available()) { Keyboard.print(myclient.read()); }
You'll likely want to flesh that out with some error checking and the like, but it should work as a skeleton.