I want to play around with an rpi to send keystrokes or keycombinations from my rpi to a windows pc.

I dont want to configure anything on the windows pc in order to achieve it. So far all the solutions I found required putty or setting up a com port on windows. Kind of like a plug and play USB keyboard.

I just need some good pointers how to get the plug and play part going and the communication part up and running.

The most simple scenario would be: Connect something like this to the rip and windows PC. Then send a keycode (or even binary, to make it more fun) trough the usb cable and type it on the windows PC.

I know there are easier ways going about this. But for the project I have in mind, this is kind of a requirement. And if all fails, I'll still have a pretty nice experience messing around with code and cables.

  • Well, if you don't want to use puTTY or similar, you can write simple serial I/O program using python 3 on both sides. Of course you still need the Windows USB to serial TTY cable. But if your PC is very old and has a COM port at the chassis back panel, or hidden inside the chassis, you can extract the TxD RxD wires out and convert +-12V signal to 5V, 0V and connect them to Rpi TxD RxD.
    – tlfong01
    Dec 6 '19 at 11:50
  • Forget my suggestion, because it an old dog's outdated trick, damaging this forum's reputation, making new dogs LOL. The old dog has heard about USB OTG, but never heard of weird names ISBIP, Synergy,and HidClient. I guess the time has come for the old dog learning some new tricks! :)
    – tlfong01
    Dec 6 '19 at 13:00

UART is an odd choice for connecting two computers. It's definitely possible to use it with a bit of programming, but don't expect there to be many pre-existing options in terms of software.

If you use any kind of network as a connections, there are many tools which allow you to forward keystrokes over the network, starting with USBIP (which forwards data from about any USB device) and barrier which require no programming effort, down to approaches based on SSH or netcat.

If your RPi supports USB OTG, there's an option to make it present itself as a keyboard/joystick/whatever on USB using configfs driver.

If Bluetooth is available, you can emulate a BT keyboard/mouse using hidclient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.