1
Fork 0
Forwarding arbitrary input devices over SSH
This repository has been archived on 2019-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
RunasSudo 630f9ae389
Also send/emulate device vendor/product codes
2019-12-03 02:45:59 +11:00
input_over_ssh Also send/emulate device vendor/product codes 2019-12-03 02:45:59 +11:00
.gitignore Initial commit of evdev-based version 2019-12-01 20:52:55 +11:00
COPYING Initial commit of evdev-based version 2019-12-01 20:52:55 +11:00
README.md Update README.md 2019-12-03 02:45:39 +11:00

README.md

input-over-ssh

Forwarding arbitrary input devices over SSH, such as gamepads/game controllers, mice and keyboards. Includes support for relative mouse pointer movement. See here for additional background and discussion.

(For the legacy implementation using xinput/xdotool, see the legacy branch.)

Usage

To use input-over-ssh, download input-over-ssh on both the client and server, and install python-evdev as a dependency.

Then navigate to the root directory on the client and run:

python -m input_over_ssh.client -L

This will print a list of all available evdev devices. If no devices appear, ensure the current user has access to the raw /dev/input device files (e.g. by adding the user to the input group).

Then pass the path of the device to be forwarded, and pipe the output to an instance of input-over-ssh running on the server. Also pass the -u flag to Python when running the client, to force unbuffered output. For example:

python -u -m input_over_ssh.client -p /dev/input/event1 | ssh hostname.example.com 'PYTHONPATH=/path/to/input-over-ssh python -m input_over_ssh.server'

For the adventurous, you ought to be able to replace ssh with netcat/socat over UDP to further reduce latency.

For a full list of command-line options, run python -m input_over_ssh.client --help.