Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Title explains it.

Imagine this example, Host computer connects to a Client computer via male/male usb connection. Client computer acknowledges this connection as a new device, in this case a keyboard. The host computer can now send key events to the client computer and the client computer would process them as a normal keyboard event.

I did a whole lot of searching in the internet and really have drove down many dead ends. Any tips would be appreciated.

Note* this is a physical connection. The client computer should not have to install any software for this to function (The host will completely spoof as a keyboard).

share|improve this question
up vote 4 down vote accepted

USB has two modes: Master and slave.

Usually a device only supports a single mode. E.g. a mouse is a slave, a pendrive is a slave, a keyboard is a slave. A computer is usually a master.

Masters and slaves can communicate with each other.
Slave <--> slave and Master <--> Master does not work.

Master and slave use different plugs to prevent people from making the wrong connection.

Picture of a USB master and slave plug

Only changing the connector does not change this.


In order to use the PC as a keyboard it will need to be able to emulate a slave. Some USB chipsets can this. Most can not. Those who can usually are connected via an AB connector.

Master only uses A (left side of above picture), or mini-A,
Slave only uses B (right side of above picture), or mini B. Devices which can do both usually come with an AB connector.

Wikipedia has a nice list of these connectors and interfaces: Notice that some of these support both a and B connections.

enter image description here

Summarising: you will need to have a non standard USB controller/chipset and a special cable. So yes, it can be done. But not by just modifying a cable and running a special program on the computer which needs to emulate the keyboard.

share|improve this answer
    
Thank you for the information, which in retrospect is rather a downer for me. I will try and search for a solution, I am open to buying hardware but it seems that this isn't a popular topic online. I really am curious how manufacturers produce drivers and software for their devices efficiently without easy solutions to test it. – Joe C Nov 19 '12 at 23:42
    
You might be able to build something with a microcontroller with at least 2 USB connections. Possible one of them USB to go ( en.wikipedia.org/wiki/USB_On-The-Go ). Or via USB to serial and serial to USB. However the electrical part of that is way over my head. – Hennes Nov 20 '12 at 0:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .