How to send keystrokes from one computer to another using USB?

Is there a way to use one computer to send keystrokes to another usb user?

What I want to do is to capture the USB signal used by the keyboard (for example, with USBTrace) and use it from PC-1 to send to PC-2. So the PC-2 will reconfigure it as regular keyboard input.

Some of them make it very valuable.

+4
source share
5 answers

In fact, you need a USB port on PC-1, which will act as a USB device for PC-2.

This is not possible for the vast majority of PC systems, because USB is an asymmetric bus with host / device architecture (or master / slave, if you want). USB controllers (and their ports) on most PCs can only work in host mode and cannot simulate a device.

That is why you cannot connect computers via USB without a special cable with specialized electronics.

The only exception is if you have a PC that supports the USB On-The-Go standard, which allows the USB port to operate both in host mode and in the device. USB-OTG devices do exist, but usually they are built-in devices (smartphones, etc.). I do not know if there is a way to add a USB-OTG port to a commodity PC.

EDIT:

If you don’t need a keyboard before loading the OS onto the PC-2, you can use a pair of Bluetooth USB dongles - one on each PC. You will need to use specialized software on PC-1, but it is definitely possible - I have already seen a possible implementation in Linux , and I am sure that there should be one for Windows. You will also need the Bluetooth HID drivers on PC-2 if they are not already installed.

On the other hand, have you considered a pure software / network solution such as TightVNC ?

+5
source

There is a solution:

https://github.com/Flowm/etherkey

It uses a network connection from your computer to raspi, which is connected to teensy (usb development boards), to send key strokes.

This solution is not a finished product. The required skill is similar to programming some other devices, such as arduion. But this is a complete and working setup.

+1
source

The cheapest options are commercial microcontrollers (e.g. arduino platform, pic, etc.) or off-the-shelf usb keyboard controllers (e.g. i-pac, arcade controllers, etc.).

0
source

SEARCH FOR THIS PROGRAM:

TWedge: keyboard software (RS232, Serial, TCP, Bluetooth)

then, MAKE YOUR OWN CONNECTION CABLE WITH:

(usb <-> rs232) + (NULL MODEM) + (rs232 <-> usb) 

Connect 2 computers, write your own program to send a signal to your (usb ↔ rs232) unit, then you can control another computer using TWedge.

0
source

The above mentioned https://github.com/Flowm/etherkey is one way. The keyboard is emulated from rPi, but the principle can be used from PC to PC (or from Mac to any). The main answer to your question is to use an OTG chip, and then you control this chip through a USB-to-serial adapter.

https://euer.krebsco.de/a-software-kvm-switch.html uses a very similar method, using Arduino instead of Teensy.

General answer: you need a device that supports OTG, or a device with slave devices: Arduino, Teensy, Pi 0 (either from brands from Rapbery or from Orange), both work, only ZERO models are OTG-compatible) or rPi- A with heavy setup (since it does not include a USB hub, theoretically it can be converted to a subordinate one, you can never find any public textbook) or any smartphone (Samsung, Nokia, HTC, Oukitel ... most OTG smartphones are capable). If you go to a Pi or phone, then you want to dig out a USB gadget. Cheaper solutions (Arduino / Teensy) need special firmware.

0
source

Source: https://habr.com/ru/post/1335744/


All Articles