Hardware

DeskHop: same mouse and keyboard on two computers, even with different OS

DeskHop: same mouse and keyboard on two computers, even with different OS

Anyone who uses due computer different in their own routine daily and you want to use the same mouse and keyboard, you have probably come up against the limits of classic solutions switching USB offered by the market. The switch devices easily available on Amazon work, of course, but they suffer from some problems: transferring the use of the keyboard and mouse from one system to another takes some time (the switch is not immediate). The procedure is also complicated by the search for the right button.

To share mouse and keyboard between multiple Windows PCs there are very effective software solutions: the first, which we mentioned in the article, is Mouse Without Borders. Developed by the technicians of Microsoft Garageit is an effective solution that not only allows you to pass the mouse and keyboard control from one PC to another with the press of a simple button but also to overcome the boundaries of the monitor in one use. Practically, moving the pointer to the left or right, depending on the physical position of the other computer, you switch seamlessly from the screen of one PC to that of the other. A nice convenience.

Mouse Without Borders It received so much praise that it became an integral part of the free Microsoft PowerToys package.

Same mouse and keyboard on two different computers with the DeskHop project

The programs described above have one important limitation: they can be used for check Windows systems with the same mouse and keyboard. Furthermore, the applications that manage the transition from one PC to another must be simultaneously installed and running on all computers.

The new project DeskHop was born from the need to find a more efficient way to switch from one computer to another, either through a keyboard shortcut or by “magically” moving the mouse pointer between monitors. DeskHop allows you to do both, even if the computers you use run it different operating systems (Windows, macOS, Linux,…).

The very first advantage is that DeskHop is free and open source: involves a reduced financial outlay (less than 20 euros) for the purchase of some hardware components. Thanks to the effective design, however, the ride with the same mouse and keyboard on two different computers it happens without any delay.

Furthermore, being an entirely “hardware” solution that works at the level of USB interfaceno software installation on PCs is required.

How DeskHop works

DeskHop acts like intermediary Between keyboard/mouse and the computer, simultaneously establishing and maintaining connections with both computers involved. The device then selects which computer to forward mouse movements and keystrokes to, based on the user’s choice. The mouse movement It also drives keyboard switching and vice versa, allowing you to quickly switch between desktops.

The communication standard Human Interface Device (HID) is used to establish a useful pattern for interaction between a device such as a keyboard/mouse and the host computer. The so-called “report descriptor“, is a data structure that describes the format and content of data sent or received by an HID device. Tells the computer how to interpret data from the connected device.

To make the mouse cursor move from one monitor to anotherDeskHop intervenes precisely on the report descriptor HID the mouse so that it uses absolute coordinates. When the user moves the pointer to the other monitor, the device maintains the Y coordinate and swaps the maximum uscite USB. This ensures that the pointer appears at the same height on the other monitor, maximizing the perception of one smooth transition.

As for keyboard support, DeskHop uses i LED present to visually indicate which output (and therefore which computer) is being used at a given moment.

DeskHop, how to use the same mouse and keyboard on two computers

How to build the USB mouse and keyboard switching device

The circuit at the base of the operation by DeskHop is based on two Raspberry Pi Pico boards connected via UART and separated by an Analog Devices digital isolator ADuM1201. The PCB design is kept as simple as possible to facilitate construction do-it-yourself.

Practical instructions for making electronic connections are published in the DeskHop repository and are even available in 3D model of the case which houses the pair of Raspberry Pi Pico. It can be easily and quickly made with any 3D printer by accessing this page.

Software side, you need to create a folder build for the compilation of the projectaccess it, run the project configuration command with CMake and then proceed with the compilation.

Alternatively, you can use the prepared images by the author (download from here) and load them onto Raspberry Pi Pico boards. There is also the possibility to update the firmware via one of the two options provided.

Raspberry Pi Pico DeskHop Dual Card

Firmware update

Updating the DeskHop device firmware can be done in two ways.

After opening the case, the button must be held down while connecting each Raspberry Pi Pico to the computer. At this point it is sufficient to copy the firmware (file .uf2) corrected in the card memory.

Alternatively, as a second option, you can set the Raspberry Pi Pico to BOOTSEL mode by simultaneously holding down the following keys: Right Shift, P, H, X, Left Shift. This operation causes the Raspberry Pi Pico to enter the mode bootloader update and they will act as if they were USB sticks. At this point, as a final step, you can copy the firmware files .uf2 on the Raspberry Pi Pico.

The images in the article are taken from the official GitHub page of the DeskHop project.

Leave a Reply

Your email address will not be published. Required fields are marked *