# DeskHop — Fast Desktop Switching Device with RP2040 > Open-source hardware KVM switch built on RP2040 that shares a single keyboard and mouse between two computers at the USB HID level. ## Install Save as a script file and run: # DeskHop — Fast Desktop Switching Device with RP2040 ## Quick Use ```bash git clone https://github.com/hrvach/deskhop.git cd deskhop git submodule update --init --recursive sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential mkdir build && cd build cmake .. make # Hold BOOTSEL on the Pico, plug USB, copy firmware cp deskhop.uf2 /media/$USER/RPI-RP2/ ``` ## Introduction DeskHop is an open-source hardware device using two RP2040 boards to share one keyboard and mouse between two computers. It works at the USB HID level, requiring no drivers on either host, and switches in under 100 ms. ## What DeskHop Does - Shares a single keyboard and mouse between two computers via a hotkey - Proxies USB HID reports between two RP2040 chips linked over UART - Teleports the mouse cursor to the matching screen edge on the other machine - Works without drivers or software on the host computers - Supports configurable screen borders for multi-monitor layouts ## Architecture Overview Two RP2040 chips divide the work: one runs as a USB host receiving HID input, the other presents itself as a USB device to the active computer. They communicate over high-speed UART. On a hotkey press the device side re-enumerates on the alternate USB port and forwards subsequent HID reports there. ## Self-Hosting & Configuration - Build with CMake and ARM GCC using the Pico SDK submodule - Flash by holding BOOTSEL and copying the .uf2 to the mounted drive - Edit key-mapping defines in the source to change the switch hotkey - Adjust screen-border coordinates in the config header to match your monitors - Assemble with two Pico boards, USB-A breakouts, and a UART wiring harness ## Key Features - Sub-100 ms switching via hardware USB re-enumeration - OS-agnostic: appears as a standard HID device to any operating system - Handles high-poll-rate gaming mice that software KVMs often drop - No background services or network stack required - Fully open hardware and firmware with community PCB designs ## Comparison with Similar Tools - **Barrier/Input Leap** — network-based software KVM; no custom hardware but adds latency and needs installation on both hosts - **Commercial USB KVM switches** — switch all USB devices; bulkier and slower than DeskHop's HID-only approach - **Synergy** — commercial software KVM with clipboard sharing; requires a background service on each machine - **PiKVM** — full IP-based KVM with video; far more complex, aimed at remote administration ## FAQ **Q: What parts do I need?** A: Two Raspberry Pi Pico boards, USB-A breakout connectors, and jumper wires or a custom PCB. Total cost is typically under $15. **Q: Does it work with Bluetooth peripherals?** A: No. DeskHop requires wired USB input because it acts as a USB HID host. **Q: Can I connect more than two computers?** A: Not with the current design. Additional RP2040 boards and firmware changes would be needed. **Q: Does the mouse position carry over when switching?** A: Yes. The cursor reappears at the corresponding edge on the other screen. ## Sources - Repository: https://github.com/hrvach/deskhop - Build guide: https://github.com/hrvach/deskhop/blob/main/README.md --- Source: https://tokrepo.com/en/workflows/asset-a11359d3 Author: Script Depot