3

I want to use one PC as a USB keyboard for another PC. It has to be indistinguishable from actual USB keyboard. How can I achieve this?

A solution that works with any of Ubuntu Linux 14 and above, OS X 10.11 or Windows 10 would be acceptable. Should work with USB 2.0 or 3.0.

EDIT: the machine to receive the input should not require any specific software installed or network access. I need to use a physical USB cable and the destination machine should react as if a physical keyboard is present on that USB port.

  • it is about: computer software and i'm not asking about a product / service / learning material recommendation – miguelv Sep 26 '16 at 11:10
  • 1
    I have reworded your question so that it doesn't sound like software recommendation question. – gronostaj Sep 26 '16 at 11:11
  • ok, maybe it's not a software recommendation, but still of a low quality. What OS do you use? What have you already tried ... Please read How do I ask a good question? and improve it. – Máté Juhász Sep 26 '16 at 11:15
  • I acknowledge the low quality and have made the edits, but those are not the points you raised in the first place. And frankly I'm a bit disappointed at the community since I've had to jump from Stack Exchange community to community and always getting dismissed as off-topic or as too generic of a problem and very little constructive effort from anyone except @gronostaj being put in to help me solve a genuine problem that should have a well known solution IMO. – miguelv Sep 26 '16 at 11:23
  • The question is very clear to me, and I agree it should have better answers. Imagine you have a machine you can't change the software on, but it does have a USB keyboard. You want to automate some typing by using another computer to simulate a USB keyboard device. Surely there are existing devices for this. – Greg Chabala Mar 19 at 1:09
3

You could use a Raspberry Pi Zero in USB gadget mode. In this mode, the Raspberry Pi can behave as many standard USB devices (keyboard, mouse, mass storage, etc.) and you will then be able to e.g. "inject" keystrokes from a program running on the Pi (and you can then control this program remotely as you see fit).

The Raspberry Pi Zero is not the only device allowing this; but it's cheap, it's easy to get one, and there are many documentations out there explaining how to do this, so it's (IMHO) a pretty good starting point for a project like this!

1

You can use usbip to make USB devices (including a keyboard) on a host computer available as USB devices on a client computer over the network. As it's a USB device, it will be indistinguishable from any USB device attached locally.

Clients exist for Windows, and usbip has been a standard part of the kernel for a long time. Under Debian and Ubuntu, the usbip package contains the programs to set up and control such a connection.

Details on how to set it up can be easily googled, e.g. here

Similar questions:

  • 1
    Appreciate your response, but what I was going for involved an actual physical USB cable and should not require installing software on the machine where that I want to send the input to. – miguelv Sep 26 '16 at 15:30
  • 1
    @miguelv: You need USB device hardware in order to be seen as a keyboard device. No amount of software will cause a USB host port to act as a device. – Ben Voigt Sep 26 '16 at 16:07
  • Huh. What is the reason you don't just unplug the USB keyboard from the one PC, and plug it into the other PC? They are apparently close enough to put a cable between them. In other words, what's the actual problem you want to solve? – dirkt Sep 26 '16 at 17:14
  • And to add to @BenVoigt, finding any sort of hardware for a PC that's going to act as an USB client (no matter if it's USB OTG or not) will be damned difficult. – dirkt Sep 26 '16 at 17:15

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.