Joey Sanchez's "HID Attack" Lets You Control Two PCs From One Keyboard and Mouse — Transparently
Using a Python program on one computer, you can swipe your mouse over to another — which only needs a free USB port and HID support.
Developer Joey Sanchez has created an Arduino-compatible tool that aims to make it possible to control two computers, each with their own independent monitors, from a single keyboard and mouse — automatically switching control when your cursor leaves the edge of one system's display.
"[This is] a hardware-based approach to Microsoft's 'mouse without borders' where you can control two computers using a single keyboard and mouse," Sanchez explains of the project, "but it doesn't have to be Windows and you don't need to run software on one of the computers. With this project, you can use software on a single system and then use two physical devices to control two computers."
While solutions, including Microsoft's own, exist for handling this task in software, Sanchez has taken a split approach — combining a Python program that runs on the main computer with sketches running on a pair of Arduino compatible microcontroller boards, linked using Nordic nRF24L01 radios.
"One [Microchip] ATmega32U4 can connect to your host machine via serial and get commands from a Python script we have running," Sanchez explains, "[then] sends commands to the secondary ATmega32U4 via wireless over the [Nordic] nRF24L01 and then allows keyboard and mouse control over a secondary system. The best part? The secondary computer doesn't know it's being controlled remotely since it 'trusts' the USB input as a keyboard device."
That feature means it's compatible with a range of devices, Sanchez explains: while the main machine will have to be running a system capable of connecting to an Arduino compatible development board and running Python code, the second only needs a free USB port and support for USB Human Interface Devices (HIDs).
The project is documented in full on GitHub, where the source code is available under the permissive MIT license; STL files are also included for an optional housing to protect the hardware.