• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    C
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Smart KVM switch

Screen Hopper: a smart KVM switch

This is a USB input switcher that lets you use you mouse and keyboard with two computers by just dragging the mouse cursor from one screen to the other. It's like Logitech Flow, Mouse without Borders, Synergy or Apple Universal Control, but it works entirely in hardware. No special software is required on the computers. It works with Windows, Linux and Mac.

Here's a demo video.

This project is derived from HID Remapper so it inherits all the nice features like input remapping, sensitivity adjustment, polling rate overclocking and more. Check out that project's documentation to see its full potential.

Screen shapes and their relative position are configurable through a web browser using WebHID (Chrome or Chrome-based browser required).

In addition to dragging the cursor from one screen to the other, you can also map a key or button to switch between screens.

Wireless receivers are supported and multiple devices can be connected at the same time using a USB hub.

Screen hopper dual Pico version

How is it possible?

As you might know, normal mice only send relative inputs (X/Y deltas) to the computer, they don't know where the cursor is on the screen. Screen Hopper needs to know this to be able to switch between the screens. So what it does is it keeps an internal state of where the cursor is based on the inputs received from the mouse and it sends the absolute X/Y position to the connected computers. It is a standard feature of the USB HID protocol, but normally it's only used by devices like touchscreens and graphic tablets.

There are some consequences to this mode of operation, for example the aspect ratios of the screens used need to be configured for Screen Hopper to be able to properly scale the horizontal and vertical inputs. Also it probably won't work very well with games that expect raw mouse inputs.

How to make the device

There are two hardware versions of the Screen Hopper: the dual Pico version and the triple Pico version. They have the same functionality, but the triple Pico version has better device compatibility - some input devices work with either, but some will only work with the triple Pico version.

See here for details on how to make both versions of the device.

How to use the configuration tool

A live version of the web configuration tool can be found here. It only works in Chrome and Chrome-based browsers. On Linux you might need to give yourself permissions to the appropriate /dev/hidraw* device. The configuration tool should be used on the computer connected to the Pico running screenhopper.uf2 or screenhopper_a.uf2.

Some of the configuration options are inherited from HID Remapper so check that project for the meaning of those settings (the mapping functionality can do really awesome things!).

Screen Hopper needs to know the screen shapes and their relative position to be able to move the cursor between the two computers. You configure that by entering the position (X, Y) and dimensions (width, height) of each screen. (A graphical preview would be nice here, but for now it's just numbers.) The dimensions use abstract units so their absolute values don't mean much, but you will find some combinations give you reasonable mouse sensitivity. You can adjust the sensitivity for each screen separately.

The "Restrict cursor" setting determines what should happen when you drag the mouse cursor outside of the screens (to the area that's not visible). If you select the "to screens" option, it will not be possible to go outside the visible area. If you select the "to bounding box" option, the cursor will be restricted to the smallest rectangle that covers both screens (this only makes a difference if the touching edges of the two screens are not the same length). If you select "don't restrict", the cursor will not stop at any of the screen edges.

Screens configuration

Depending on the screens configuration and the "Restrict cursor" setting, it might be possible for the cursor to be outside of the visible area. There's a separate setting for mouse sensitivity for that situation.

If you configure the screens so that they don't touch each other (there's a gap) and select the "restrict to screens" option then it will not be possible to drag the cursor from one screen to the other. You can still switch between the screens by mapping some key or button to "Switch screen".

If you can't use the browser-based configuration tool, there's also a command-line tool that takes JSON in the same format as the web tool on standard input. I only tested it on Linux, but in theory it should also run on Windows and Mac.

How to compile the firmware

git clone https://github.com/jfedor2/screen-hopper.git
cd screen-hopper
git submodule update --init
cd firmware
mkdir build
cd build
cmake ..
make

More Repositories

1

hid-remapper

USB input remapping dongle
JavaScript
1,035
star
2

flatbox

Low profile hitbox-layout fightstick
C
667
star
3

rp2040-pmw3360

RP2040+PMW3360 PCB and code
C
276
star
4

two-ball-trackball

DIY trackball with two balls
C++
231
star
5

scroll-ring-trackball

DIY trackball with scroll ring
C++
184
star
6

trackbowl-mk2

The ball is the trackball
C++
156
star
7

twist-to-scroll-trackball

DIY trackball with twist-to-scroll
C++
107
star
8

pmw3360-breakout

Breakout board for PMW3360 optical mouse sensor
94
star
9

gamepad

Arduino PC/PS3 compatible gamepad
C++
67
star
10

magellan-spacemouse

Adapter to use RS-232 Magellan/SpaceMouse with modern software
C
37
star
11

nxt-remote-control

Control Lego Mindstorms NXT robots from Android devices via Bluetooth
Java
32
star
12

mouse-multiplexer

Two mice, two cursors
C++
28
star
13

quake3-proxy-aimbot

Quake 3 Proxy Aimbot
Python
27
star
14

hat-mouse

Bluetooth input device using an orientation sensor
C++
23
star
15

paaas

PlayStation controller authentication as a service
C
22
star
16

mouse-switch-mount-pcb

Helper PCB for mounting mouse button switches
21
star
17

radial-controller

DIY Surface Dial
C
21
star
18

zero-latency-gamepad

Zero latency gamepad POC
C
15
star
19

notificationface

Wear OS watch face displaying notification icons
Kotlin
14
star
20

wheel-adapter

PS5 adapter for old Logitech wheels
C
10
star
21

spaceball-2003

Adapter to use Spaceball 2003 with modern software
C
10
star
22

ikea-tradfri-google-assistant

Google Assistant support for IKEA TRÅDFRI lights
Python
8
star
23

meet-mute-button

Mute button/status indicator for Google Meet
C++
8
star
24

usb-rubber-ducky-mouse

USB "rubber ducky" with mouse input
C
6
star
25

gt7-rpm-lights

DIY RPM lights for Gran Turismo 7
C
5
star
26

trackbowl

Bluetooth trackball with all the electronics inside the ball
C++
5
star
27

slimbox-bt

Wireless game controller firmware
C
4
star
28

latency-tester

C++
3
star
29

darkroom-tray-timer

Darkroom tray timer
C++
2
star
30

ms-paint-chart

Plotting sensor data with MS Paint and Bluetooth HID
C++
2
star
31

blinkenlights

Add blinking lights to your Linux box with a Raspberry Pi Pico
C++
2
star
32

pico-nunchuk

USB adapter for a Wii Nunchuk
C
2
star
33

darkroom-enlarger-timer

Darkroom enlarger timer
Dart
2
star
34

hippopaint

JavaScript
1
star
35

pico-morse

Morse code USB keyboard
C
1
star
36

human-trackball

Use a gym ball as a Bluetooth mouse!
C++
1
star
37

force_webconfig

CMake
1
star
38

timecube

Time tracking wifi cube
Python
1
star