Hacker News new | past | comments | ask | show | jobs | submit login
DeskHop – Fast Desktop Switching (github.com/hrvach)
1248 points by rcarmo 9 months ago | hide | past | favorite | 273 comments



Good to note that it doesn't require client software to detect edges.

> To get the mouse cursor to magically jump across, the mouse hid report descriptor was changed to use absolute coordinates and then the mouse reports (that still come in relative movements) accumulate internally, keeping the accurate tally on the position.

So it works like synergykm / barrier, without clipboard features and without client software.

Very nice.


Very nice to not require the computers to connect over the network.


This was a concern for me, that is why i've used Synergy over VPN and it worked quite well. It also works on networks where you can't reach the other pc's that way.


I initially used synergy at work between two computers and a coworker teased me about the security implications, so I found it very little effort to pipe over an SSH tunnel


Barrier has built-in encryption


Can you share some info about that? How is it different from synergy business/enterprise where it encrypts your data? (aside from owning the encryption)


I don't know how the business edition works, but how to set up SSH tunnels is easily found on Google search, and you'd just forward the port the server listens on, and connect to localhost on the client on the same port. Very simple, and at least as secure as SSH is proven encryption.


You should check out https://pikvm.org/


tailscale makes the VPN easy these days.


I doubt the reason for avoiding connection is a technical barrier but rather a security one. For example, I prefer to keep my personal and work laptops completely airgapped.


I also like zerotier


Yes this is so clever and beautiful. Projects like these are my favorite thing to discover on HN.


Would that completely break down if your cursor is moved by something other than the mouse? (An automation script, a game that locks the cursor to the middle of the screen, etc.)


Is that a common practice in games? What is its purpose? To stop botting?


I think that's to prevent the cursor from hitting the edge of the screen and the player being unable to turn further (though I'm not certian if every game does it this way)


> Ever tried to move that YT video slider to a specific position but your mouse moves too jumpy and suddenly you are moving your hand super-carefully like you're 5 and playing "Operation" all over again?

On YouTube specifically, you can scrub through a video frame-by-frame using the , (comma) and . (period) keys, no custom hardware required. :-)


I wish there was a solution for Android. Sliders for fine grained selections are horrible in touch interfaces.


You can pull the slider up for finer control, though every now and then they tweak how well this works so YMMV


"fine grained" is relative, but you can go forwards/backwards 10 seconds in YouTube Android by doubletapping to the left/right of center on a video. If it's paused, doubletap to the left/right of the play button. It should also work on iOS, but I don't have an iPhone so can't confirm.

https://www.majorgeeks.com/content/page/youtube_double_tap.h...


I use iOS and can confirm that double tap on left or right side works to jump forward backward there too. I often use it when I watch a video and I miss what was said so I jump back a bit and watch again.


You can also set the skipping jumps to 5 seconds in the settings


I wish we had standardized on “the longer you leave your finger, the finer the control”, but it seems like no one even adds that modality.


Its swipe up while moving the trackbar to go into fine control and down again for coarse.

YT also has Premium Controls whcih is a widget but I think it's experimental and not on mobile yet.


Swipe up only works when:

1. There is enough room. Works fine for media controls where the bar is near the bottom of the screen, but not for sliders in most other places

2. The control is not close enough to the bottom of the screen for swipe up to trigger the multitasking action

There are many other reasons to have fine-grain control for sliders and imo “hold longer for finer control” works in more places than “slide up for finer control”


When is the slider not at the bottom when you want fine-seeking? In cases when its not fullscreen, I don't ever need fine seeking.

It's not really "slide up" its just a very tiny motion, maybe less than 1cm of travel to enable it.

We already have long press and 3D Touch events via the "hold longer" action, which might work, but I've had no real issues with the YT solution.


> When is the slider not at the bottom when you want fine-seeking?

When your slider is not controlling video playback


I'd consider that a different UI component completely.

YT implementation turns the fine-tuning seekbar into a series of thumbnails to help find where you are.

Stuff like this obviously doesn't make sense for controlling something that is not a video.

I do like some tools which let you fine-control slider once you have click-and-held by scrolling the mouse wheel, but no solution here for mobile.


Can't you double click the left or right edges of the video to scroll 5 seconds to the past or future?

This works in my modded old version of the YouTube app; Alphabet might have removed it in newer versions.


Same on iOS.


At least in Android you can pull the slider up for finer control, though every now and then they tweak how well this works so YMMV


Same on iOS


I doubt there's any Android exclusive feature to apps developed by Google. Sometimes feels like they even prioritise iOS over Android.


Anything between 30 seconds and 1 frame is impossible.


The J and L keys will skip back and forth 10 seconds.


And left and right 5 secs.


Control left and right for chapters.


I wonder when they added that, I remember wanting it and it not existing when they first rolled out the chapters feature around 2020.


That's nice. Btw, I'm curious, what kinda mouse do you guys use that makes you hold your breath while you scroll? I believe mice these days are super precise and works pretty well.


The mouse ain't the problem.

Once I was fast and precise, with sharp close vision. Now I'm not.

Enjoy your capabilities while you have them. Decline awaits us all.


Because it's not necessarily the mouse, but us :P


Those are the same hotkeys that mpv uses. I don't know who was first, but I knew it from mpv and tried it by accident on YouTube and it worked :D


Wow, did not know that. TIL. Thank you!


On Windows, you have the option of using a tool named Mouse Without Borders, which was developed by Microsoft Garage and is now part of Windows PowerToys.

Links:

  - https://www.microsoft.com/en-us/garage/profiles/mouse-without-borders  
  - https://github.com/microsoft/PowerToys


Barrier is a Cross-Plattform, open source Synergy fork that works quite well without any additional HW too [0]

Edit: I just noticed it is unmaintained (never bothered actually because it works. Input leap is the continuation

[0] https://github.com/debauchee/barrier [1] https://github.com/input-leap/input-leap


Glad to see it mentioned here. I used it a few years ago and it worked really well.

It makes it especially easy to drag and drop file copies across computers.


I bought 4 USB hubs just to switch the keyboard and mouse, it's just so annoying how most devices are so terrible. Randomly you have to physically detach the hub several times a day. If you plug webcams and/or USB mics, it only gets even worse.

I'm using Synergy software and it works well, but I still want a proper KVM that can allow for webcams, mics, audio, etc. Features like moving only a group of plugged devices via keyboard shortcuts.

KVM users are underserved for sure.


The best setup I've found is what I lucked into at work. It's a Benq monitor (32", 4k) that does the KVM itself. There's a couple of Displayport inputs, each if which has a couple of USBs with it, as well as a USB C which is both peripheral and display input (and decent power output). Then there's a little pick on the desk for switching.

The nice thing is that it continually presents a monitor to all the inputs even when they're not being displayed. Means you don't get the flickering as Windows sorts itself out and so a much faster and more seamless switch.


Which benq model is this?


Looks like it's the PD3205U (https://www.amazon.co.uk/BenQ-PD3205U-Designer-Technology-Co...). Am not at work to double check.


> KVM users are underserved for sure.

100%

I want to share keyboard, mouse and monitor between a PC and a MacBook. A KVM with DP+USB on one side and Thunderbolt on the other doesn’t seem to exist.. I feel like this has to be a common use case :(

I know I could break out on a dock first, but I have a particularly high-res monitor which most of the docks baulk at, or only support at 30Hz


If you want a proper kvm, see the offering from level1techs/wendell (not affiliated, just a satisfied customer) at https://www.store.level1techs.com/products/hardware

I used one with 4x dual dp switching at home to run desktop with linux, pcie passthrough gaming vm on same machine and my work laptop via a dell thunderbolt dock connected to it.

Works extremely well, with modern features tested for (gsync, high refresh etc etc).

edit: one thing to note is that you need really good quality cables, so don't cheap out


I get how the Linux desktop and the Work Laptop would work in this setup.

But how does the KVM come into play for the Gaming VM when it is on the same host?


It was pci passthrough so the vm had a dedicated gpu, usb controller and nvme drive which I wired to the hardware KVM as extra inputs.

There are other options like https://looking-glass.io/ , but I preferred having this option, which is like having 2 computers if there's enough resources to share to the gaming guest (cpu pinning + huge pages).


I'm in the same boat as you. After trying and returning a few KVMs, I found a decent USB-only KVM switch [0] that works with 4K HDR + PD devices (I think it just electronically connects and disconnects cables), it works amazingly with switching between Macs, but my PC GPU doesn't have USB output, just DP. I have bought a Thunderbolt PCI-E card (ASUS ThunderboltEX 4), it worked, but only turned on once Windows has fully booted, so I returned it too. I'm considering buying an USB-C signal muxer [1] but they are a bit too expensive for my liking. I guess there isn't enough market to produce them and sell them at reasonable price - most people, including myself, just accept having to switch video input separately from USB KVM.

[0] https://www.amazon.co.uk/dp/B0BN5D2NXX

[1] https://www.amazon.co.uk/dp/B0732W9DG8


Check out https://www.store.level1techs.com/products/p/kvm-switch-usbc... paired with https://www.store.level1techs.com/products/p/dp-repeater-hdm... for one of your computers - it may do the trick for you. There are other models if you want more monitors or computers (or different set of inputs).

No affiliation with them except that I've got one their KVMs (not an USB-C version, though) myself and it's been quite reliable (only infrequent accidental hiccups, nothing unplugging the power for a second can't solve), much better than my previous pile of hacks juggling monitor inputs via DCI and using USB switches for the peripherals.


I share two monitors and audio equipment between a desktop and a windows laptop (dell XPS) using a "dumb kvm" that wrangles a few USB outputs and two DisplayPort inputs. the laptop only has USB-C output so it connects to a fancy thunderbolt dock borrowed from a friend which then goes to the KVM. I have a third monitor only connected to the desktop with a laptop stand in front of it for a third screen

It takes a couple seconds to switch but otherwise works flawlessly unlike my previous solution of shitty dongles, switching dual input monitors, and moving a usb hub input cable between machines. I also considered rebuilding the desktop to have a thunderbolt output and buying a thunderbolt switching KVM but I couldnt make it work

desktop - kvm - fancy dock - laptop Full diagram: https://imgur.com/a/ah54fjd


Closest I’ve found is manually switching the machine plugged into a TB 4/USB 4 dock (CalDigit TS4), with the cables for each computer being managed when unplugged by a magnetic cable pad[0].

It’s a bit clunky but not too bad once you have a feel for swapping cables and is less flaky than the more affordable KVMs I’ve tried. Gets me a nicer port loadout to share between machines too, and can be expanded to support as many computers as you’ve got space and patience for.

This does however assume all machines involved can handle outputting a display signal via Thunderbolt or USB C. Not too much of an issue with laptops but it’s still unusual for desktop PCs to have their GPUs hooked up to support TB/USB alt modes.

[0]: https://www.amazon.com/dp/B08XYZFM7D


I even got TB4 signal through one of those USB-C "magnetic" adapters [0], I figured that this would shift wear from repeated plugging from the expensive device to a cheap adapter.

Super annoying when you accidentally disconnect and then the entire device tree has to reboot, but on the hub side, accidental disconnect might be much less of a problem (I use it at the laptop side, to dock with different screen setups)

[0] like this, https://www.amazon.com/dp/B0BV7BPVCL/ but ordered from the Chinese site


I have a compromise setup but it seems to work ok. Two MacBooks, one pro, both M1.

One is plugged into a TS3+. The other is plugged into a USB-C dock to get Ethernet and a USB-A input, but I don't use the video out. Instead, I run a Thunderbolt to DP cable from a second TB port to the KVM switch.

I use this KVM ordered on Amazon: Cable Matters USB 3.0 KVM Switch DisplayPort 1.4 for 2 Computers with 8K@60Hz

Pros: preserves 5K@60Hz for both machines, switches keyboard, mouse, and a webcam just fine.

Cons: no hot key switching, another remote to lose, no EDID emulation so the computers fall asleep when they're not active, switching takes a bit. Sometimes a machine doesn't wake up when I switch back to it so I have to fiddle with cables, but that's been pretty rare.



> I want to share keyboard, mouse and monitor between a PC and a MacBook. A KVM with DP+USB on one side and Thunderbolt on the other doesn’t seem to exist.

It does if you use the built-in KVM in a recent Dell Ultrasharp display, and change Thunderbolt to USB-C.

My setup is a MacBook Air plugged into the USB-C port, a Windows PC plugged into the Displayport/USB port. Mouse and keyboard are plugged into the display.

I switch inputs via a StreamDeck. The StreamDeck just sends a key command; on macOS, BetterDisplay handles input switching, and on Windows, the Dell Display Manager app does the job.

Switching is a touch slower than I'd like, but beyond that, it's flawless.


Most monitors have 2-3 inputs. Mine has a desktop, a laptop, and occasionally my phone attached to it, using HDMI, DP, and another DP / USB-C respectively.

Unless you switch really often and want subsecond switching time, three's no need to even use a KVM to switch the monitor.


Even at twice per day switching using monitor controls would drive me nuts. The buttons, the menu, the delays, blanking and disconnects. By then I already forgot why I was even switching


Most of the time the reason for a KVM is wanting to switch the monitor, mouse and keyboard, and possibly other devices (e.g. I want to use the same webcam that remains in the same position) at the same time.

Switching just the monitor isn't really the use case they address.


I share a mouse and keyboard between pc and mac with a usb switcher.

Two monitors. Both the mac and pc are connected to each monitor. I just switch inputs as needed.

It’s not as good as one button press but heck i can monitor something in both systems if I want


I know it's suboptimal, but can't you do the split on the macbook? The TB port should output pure DP, so you plug that on the DP-in on the KVM. You plug a second USB-only cable that goes to the KVM USB in.


I recently bought the 32" 6k monitor from Dell. It has its own thunderbolt 4 hub and kvm and it works flawlessly! It gets upstream from my Mac from a single thunderbolt 4 cable and from my PC from an HDMI 2.1 and usb3 10gbps. On the monitor I have connected the Ethernet cable and my keyboard/mouse that switch to the correct machine with a keyboard shortcut or from the monitor osd.

I can even see both machines on my monitor simultaneously using the PiP capability.


I've been very happy with my tesmart dual DP 4 port KVM. The only limitation I have is that it's only usb 2 host controller, so a lot of higher speed devices like some webcams can't get switched using it.

LAlso if you need Apple products in the mix, you have to use two physical usb3 cables from the mac just to distinguish the two display channels because apple hates MST for reasons (another reason to hate their arbitrary bs).


I have a TESmart and the other problem is that the autoswitch doesn't work with custom keyboards, as the KVM needs to emulate the HID and doesn't like a keyboard that shows as a hub.


I have an ATEN usb KVM that allows anything to be plugged in. I have an USB drive to quickly transfer files but works with anything USB powered. It's expensive if you go for USB 3+, DP, etc but cheaper ones work also just for USB stuff. One big drawback, at least for me, some mice and keyboards that have special keys, do not work 100%.


I’ve been using a software solution for this for over a decade. It’s called Synergy (https://symless.com/synergy) and it is fast - switches instantly over wifi and also works across Windows/Mac/Linux.


Synergy, Barrier, and Input Leap are all pretty good software solutions stemming from the same ancestor. The latter two are free and open source. Synergy has a nice way of organizing the boundaries between your machines.

I wish any solution had custom monitor interleaving. My personal setup is such that the monitors are not set up linearly, and each monitor can independently switch to each machine. Specifying the boundaries on a per-monitor and per-machine basis would be amazing, but it doesn't seem to exist in software or hardware form.

I spoke to Synergy recently and they said it is on the road map as a popular feature request. Hopefully soon!


I tried to use this for a while but it didn't work well when using different VPNs on different computers. So, I bought a commercial device similar to the DIY one here and it works amazingly well. It doesn't require you to log in to the computers first and you can switch by moving across screen edges or with a series of keystrokes. You can also switch the attached USB devices independently of the keyboard and mouse.

The product is sometimes called a boundless, borderless, or roaming KM switch.

https://www.cdw.com/product/siig-4-port-roaming-km-switch-wi...


The computers need to be able to reach each other, yes. You should be able to do that by adding a route overriding the VPN route (just like how any VPN client has to prevent the traffic to the VPN server from going through the tunnel).


No one has mentioned ShareMouse yet? (https://www.sharemouse.com/) In my experience it has worked way better than Synergy. I switched after getting fed up with the synergy developers not responding to various multi-year old bugs that made the software unworkable for me (e.g. https://github.com/symless/synergy-core/issues/5992).

The only downside is that you have to "renew maintenance" to continue receiving updates to ShareMouse after a year. But I haven't done that yet and it still works fine for me.


A few months ago my mouse stopped working on my 2nd computer. It took me a few minutes to fix because I just plain forgot I was running Synergy. I checked, and my setup had been working without issue for 4-5 years. Definitely near the top of my list for valuable paid software.


Looks awesome, but sad they put TLS as a premium feature above the basic for pay sku. Security should be default in everything and for free. It’s not a luxury, it’s a table stakes bare minimum thing. (That said I’ll try it out and if it’s good I’ll license the premium sku for the copy and paste feature)


Listing security as a premium feature, and "business use" not having pricing instead requiring a sales call are good ways to stop me from using any app.

Even if it's not true, I feel like I'm going to be nickel+dimed or hit with mysterious and surprising fees.

As someone who creates software, I want to comply with the licensing out of principle and respect/admiration for creators. It shouldn't be so difficult to understand what it would cost me.

Opaque pricing is an immediate "no thanks" for me. I honestly don't care how good an app is; if it's not easy to buy, I'm not going to buy it.


I bought Synergy and ended up not using it shortly, nowadays I use a cheap physical USB switch(about $20) that can work with 4 PCs sharing one set of keyboard and mouse, super robust for me, and quick too.


What about switching display input source?


Amazon has a lot of cheap KVMs now. I have a DisplayPort one with 3 USB ports and my favorite part, a wired button to switch between computers! I just stuck the button to the bottom of my desk top and can switch instantly. There’s also a wireless remote I’ve never tried and a keyboard hotkey (though using its special keyboard port confused my Mac so I plug my keyboard into a hub through the KVM’s ‘generic’ USB port.

I’m not affiliated with the maker in any way but if anyone’s curious I can go look up which one I have. It was just a random Chinese thing under ~$45 or so.


I have an amazon cheapo. It takes several seconds to switch hdmi, during which there's an edid exchange.

I'd love to have a more sophisticated device that switches in under a second.

Hdmi is also slightly glitchy. All in all, it's a slight improvement but not what I'm looking for.


As far as I understand it, everyone is better off completely avoiding HDMI in favor of DisplayPort if at all possible.* HDMI has many confusing poorly-specified versions, includes a bunch of DRM to serve content cartels rather than the consumer, and just overall is less reliable. Is going to DP an option for you? Hopefully you have DP as an option on both ends of everything.

My Amazon cheap DP KVM is fast enough for me when switching, my guess is somewhere in the 0.75-2 second range, I'll have to time it for you. I'll reply again with the results.

*Note: i mean for monitors, i'm aware that i'm not gonna avoid it in the living room :)


I'm on sabbatical, so not currently needing a switcher - but I'll get a displayport kvm next time.


I tested it. It's about 3 seconds when switching to my Mac Mini (where this is the one and only monitor) -- it takes a couple of seconds longer to switch back to my laptop because I use the laptop open and macOS seems to take forever to think about which windows to move around randomly before lighting up the external display.


Synergy is great, its widely used on complex lab equipment where different parts are controlled by different PCs, sometimes running different OSes.


My first use of Synergy was in the mid 2000's, using the same KB/Mouse on a Windows XP machine with a Debian desktop box next to it. Worked fabulously for a long time.


With VR headsets and increasing 8k TV affordability, screen real estate is really getting big.

Technies almost always have a laptop, phone, and home desktop up at once, often have some media/fileshare, and then there are VMs to further the complexity.

Here's what I've been wanting for years: a big ass 8k wraparound monitor, and it has clickable widgets in the desktop to turn on the computer/VM and activate the display feed into some part of the desktop.

There's a primary desktop area, and that area is surrounded by "neutral zones/buffer zones where if you take the mouse into that area and click on it, it would swap the "primary" area to that machine and place the former machine's display into one of the peripheral areas of the large display, or secondary monitors.

With "cores to spare" in modern Moore's law scaling, I should be able to have several OSes seamlessly running at once, not the virtualbox stuff or other clunkiness, a much more seamless experience. There's a lot of hardware/CPU features to support it, but of course the OS vendors/distros have no prioritization to do something like that. It's also a fundamental failing of IoT.

We are all moving towards a world where we have a dozen decent-class computing devices (Multicore multiGhz phone, 2x that for a tablet, 2x that for a laptop, and 2x that for a desktop) even not counting IoT, media, etc.

We need a truly distributed OS that can handle this stuff. Windows/Android/iOS/OSX won't do it, they are in the walled garden business we need Linux to do it. The cloud projects, k8s / etc wanted a "datacenter OS" but basically failed.


> With "cores to spare" in modern Moore's law scaling, I should be able to have several OSes seamlessly running at once, not the virtualbox stuff or other clunkiness, a much more seamless experience. There's a lot of hardware/CPU features to support it, but of course the OS vendors/distros have no prioritization to do something like that. It's also a fundamental failing of IoT.

No. The hardware features that allow running multiple OS's at once is what VirtualBox/QEMU/HyperV/Xen/etc. use, and those feature require a privileged OS to manage it.

The hardware does not support having multiple OS's manage the machine at once - even if they could be made to run, they'd step on each other and make hardware crash as they all try to configure it differently at the same time, and with them all in ring 0 they'd be able to arbitrarily compromise each other. Plus, you'd be annoyed that each of, say, 3 OS's could only use 1/3rd of all resources - 16 cores and 64 GB of RAM may seem like lot, but 5 cores and 21 GB of RAM does not.

It's a dumb idea. Just get a better OS, a better hypervisor, better "fastboot to other OS" features (say, 1-5 seconds "hibernate and resume other OS"), or another desktop.


>Techies almost always have a laptop, phone, and home desktop up at once

What definition are you using here? I like tech and worked as a software engineer (not working now), and I haven't owned a desktop in over a decade. If we're talking "almost always", I think these days I have 0 phones/laptops up most of the time followed by 1 in pretty close second place, and even having 2 (let alone 3 or more) is uncommon for me.


Write more in depth on what you want, you describe too many concepts all jumbled together. We have been moving away from homogenous systems for a long time, it is hard to compete if you want to be "the one". Apple is the closest to that but in the same way seems to be the farthest away from what you describe.


Cant believe I am only learning about this now. Darn - I've needed this for over a decade.

Also, havent heard Full Sail in a really long time... Had a friend from growing up that went there and became famous...

THanks for the link - Ill be installing this around my place today :-)


https://github.com/debauchee/barrier is the still-open fork.


barrier is basically a dead project now. The active members of the project forked it and are going to release when ready but

https://github.com/input-leap/input-leap

Keep an eye on that for anything new


How much ongoing development is needed for something like this? I've been using synergy/barrier for years and the features I need have changed barely if at all during that time. Seems like a prime candidate for "finished" software.


Barrier doesn't support Wayland, which is a pretty big missing piece at the moment for Linux users.


I use "lan-mouse" on Wayland.


Mostly finished. However, these software take advantage of the accessibility features of each OS to emulate mouse and keyboard input. Clipboard access is also required. So as each OS changes the requirements to access those features, someone has to keep updating the software for that.

Synergy doesn't work on Wayland, so I can't use it on Fedora anymore (unless I switch it back to X).

There's always new feature requests. Drag and Drop files is a common one. I personally think that's scope creep, but I can see the appeal. Synergy and barrier already establish an encrypted connection between machines, so copying a file seems a good fit. At very least a "Synergy send to ${computer}" share/send to option would make sense.

Here's Synergy's roadmap, and since Synergy and Barrier are the commercial/open-source fork of the same ancestor, Barrier probably has received similiar requests over time.

https://symless.com/synergy/roadmap


I have a similar project inspired by another similar project (https://github.com/jfedor2/screen-hopper).

My own version of this consists of two programs.

One program runs on a Linux desktop and listens to input events from the Linux input subsystem (evdev). When you press a specific key, it will start consuming all events and sending them over USB serial to a RPI Pico. Pressing the key again will toggle back into passive listening mode.

The RPI Pico is programmed to receive Linux evdev events over serial, translate them into USB HID events and send them to another Windows PC.

The end result is a KM switch that switches instantly between a Linux PC and a PC running an OS of your choice.

Epic wiring photo: https://ibb.co/m0zhzgz. I used another Pico as a USB serial adapter.

As a hardware noob, needing only 2 wires was a huge relief and I think this is a great starter project for other hardware noobs.

Both programs were < 100 LOC. There are tons of Rust crates and python packages to listen to Linux evdev. The program on the Pico was quite simple too, basically just a loop with a big switch statement and there are Rust crates to send USB HID events. You can use COBS to send stuff over serial without worrying about framing.

Ultimately I never ended up open sourcing it because of some USB serial bugs (it would not reconnect properly to the Linux desktop after getting disconnected). Not sure if it was because of Linux or the Pico. I still use it, the bugs aren't a problem because I never disconnect the wires.

I also specifically left out the absolute mouse feature since I play a lot of FPS games and it wouldn't work with those. I have the switch key bound to a button on the side of my mouse anyway so I can switch systems without even touching my keyboard.


That's an awesome idea, man. I wish I thought of that.

I learned about about that screen hopper project only yesterday, and it just confirmed my theory - whatever I try to do, somebody smarter than me already made, only better, smoother running and with nicer features :)

I play no games whatsoever so absolute coords would be perfectly fine, but one of the items on the to-do list is to make it configurable.


IMO the hardest part of open source is documentation and packaging so hats off to people like you who take that final step from tinkerer's project to open source! Also props to you for the galvanic isolation and actually designing a circuit lol.

I'm sure there's even more keyboard/mouse switching projects out there, there's just no good acronym or search query to find them. You could search for "KVM" but it's just dominated by PiKVM. We should really standardize on something for the SEO.


Your project is practically an example for Teensy boards. I made this exact gadget 10 years ago :)

Ultimately my friend was explaining his 'mouse jiggler' vbscript and I thought 'how can I make this a hardware version' this led to a design and once you have a design it is easy to query google for design hints at the component level "usb hid microcontroller" "usb passthrough [teensy|arduino]" "usb init host controller [teensy|arduino]" "mouse path [teensy|arduino]" etc etc


I’m trying to grok the absolute coordinate issue.

Does this mean your solution would break if someone was playing a FPS/game?

And is the solution to use relative coordinates but lose the auto transition feature? Meaning that you would have to manually switch?


Many FPS games move the camera by listening to relative mouse movements and moving your camera a corresponding amount, while keeping your cursor hidden and in the center of the screen. Absolute movements cause different issues depending on the particular game.

I am not familiar with HID but I assume there is a way for the computer to provide feedback to the input device about the cursor’s current position. If that’s correct, it could probably be done with relative movements just fine.


I'm not very versed in gaming, so have very little knowledge about what games want. It should be possible to implement a relative mode too and some way to switch between the modes so when working use absolute, when playing use relative.


> Ultimately I never ended up open sourcing it because of some USB serial bugs

Shouldn't that be a reason to open source it? Nerdsnipe someone else into figuring out the sublety that's causing the bug!


A bunch of folks have suggested I open source this regardless of the bugs and I think their arguments have merit!

Here's the source, provided as is: https://github.com/null-dev/picokvm


Would you be willing to throw it into a repo with a warning that it is user-beware with no support?


I'm sure people would be interested in seeing it even if it still has bugs


This been one of my biggest frustrations - I also use a USB 3.0 switch to toggle mouse & keyboard input between two PCs. I'll be on a teams call meeting where I don't have a lot to say and then someone mentions my name or messages me. I'm suddenly fiddling around looking to find the button to switch inputs back to the PC running teams. I thought about wiring up a ESP32 or Rpi Pico W with couple of optoisolators to the button pins on the USB switch. Then expose a http endpoint to simply toggle inputs between two machines via autohotkey script + keyboard shortcut. Only problem was that I couldn't come up with a way to determine which input is active. So gave up on the idea. But I like this solution.


Have you looked into a headset compatible with Teams that has a mute button? My work provided a Logitech branded headset that has volume, hang up, and mute buttons on the cord, which makes it much easier to unmute myself while multitasking.


Synergy works well for this purely in software. Unfortunately it's not free or open source, but it's relatively inexpensive.

https://symless.com/synergy


Prior to Synergy going to closed source, it was forked into Barrier[0], which then was forked into input-leap[1]. Both open source.

[0] https://github.com/debauchee/barrier

[1] https://github.com/input-leap/input-leap


Input leap was forked two years ago and the Readme still says "we hope to have a release ready very soon", which doesn't sound very hopeful. Too bad, Synergy was always a very useful project.


This announcement was only added to the README in early October[1]. In the meantime you can of course compile it yourself/grab a build from GH actions. I'm sure they would appreciate the testing, especially leading up to release :-)

[1]: https://github.com/input-leap/input-leap/commit/78ca8f1ef7b6...


Oh good, thanks, I will!


I haven’t tried Synergy. barrier and input-leap were useless for me as they don’t capture “ctrl-alt” so my crucial “open a terminal” shortcut always opens it on the primary computer. Maybe Wayland is to blame?


You might have to change the modifier keys on the server config. I have a Linux server and MacOS client, a few minutes trial and error fiddling those settings until I got it all working.


Didn't have any problems with X11 and various computers - so maybe it really is Wayland-specific?


Thanks! I had thought I remembered Synergy being open source. I haven't used it in a while, so it's good to know there's alternatives.


Unfortunately there is no simple way of makeing this work on a Chromebook


Synergy is open core, these portions are licensed as GPL: https://github.com/symless/synergy-core/#License-1-ov-file

There is an open source fork that branches off version 1.9: https://github.com/debauchee/barrier#what-is-it


Synergy has some bugs they just don't seem to care about. For instance, if you use a macOS host, the calculation of where your cursor on a Windows/Linux client uses the macOS acceleration curve, but the actual movement of cursors does not. So you end up switching back unintentionally trying to do things on the third of the windows screen closest to your host.


Any suggestions for Windows & Android (tablet)? All the solutions seem to only work with desktop OSes.


I have a saying “nothing sucks like synergy but they all do”. Not a single one of these technologies is reliable. But synergy is the one that has multiple times made even the connected keyboard stop working to the point where the machine needs to be power cycled to become responsive.


Thing is, I used the old OSS Synergy some 15-20 years ago, across Linux, Windows and I believe OSX as well (although I am not 100% certain about the latter). It worked absolutely flawlessly for several years while I used it and I loved it dearly. Fast forward (I had no need for a software kvm until last year) and I use Barrier now and it barely works. Autostart on Windows doesn't work at all, the installer failed to create certificates so nothing worked until I created them manually and sometimes the keyboard dies completely or exhibits frustrating bugs which only a reboot can solve. It's baffling how this used to work so well and is barely usable 15+ years later.


Totally agree. Back in 2004 I used it daily to bridge between two PCs running on one network, behind a firewall with one running the synergy server and the other the client, and a laptop running the client. Both PCs were under my desk with my laptop and two screens from the PCs on top. I had one keyboard and mouse across three screens powered by three computers and could seamlessly not only move my mouse across all 3, but also copy paste text across too. I believe a newer version (which may never have materialized before it went closed source) was going to have drag n drop across too. It was so easy to work with and remember it very fondly. It was magic stuff.


Turn off clipboard sharing, use a config file, and barrier works well on most systems.

Way too much BS to get it running though.


It works until it doesn't. And clipboard sharing is "essential" to me. Wrt/ clipboard sharing, yes, I could work around not having it available but that's 50% of why I use it in the first place and as I said everything worked absolutely as expected in the olden days. Yet another tech that has only gotten worse over the last decate, similar to the shit show that instant messaging has become. I miss the times where I could run a well-integrated multi-protocol chat client on all of my computers regardless of OS which required basically no RAM or CPU usage to chat with all my contacts regardless of what protocol they used. Now it's mostly Electron crap eye candy taking too much resources by a factor of >100 and way too much screen estate. It's simply not practical anymore. "Things were better before" is in 99% of cases a factually untrue, romanticized view on the past, but sometimes it's objectively true, and in rare cases like IM there are serious negative effects on my personal quality of life that I cannot fix on my end because the system itself is broken.


Does Synergy work with multi monitor setups? I've enjoyed Barrier but it doesn't work when any of the machines have multiple displays so I've ditched it for now.


I use barrier across 4 monitors and three devices, works fine.

Nowadays you have to look at the logs and search through a pile of github issues to find the right solution to make it work, but once it's up it's pretty trouble free.

Only real pain point is clipboard sharing, which works for small clipboards, but, copy too much text and it takes forever to switch.


Synergy works with multi-monitor (for me at least). I've been using it for close to two decades. Outside of the Linux kernel, it is probably the single piece of software I've used the longest.


https://github.com/debauchee/barrier is the free open source version of this


The fact that TLS connection encryption is gated behind the $60 edition (vs the $30 personal edition) completely turned me off it. Not a fan of basic security being paywalled.


And its new version has been rewritten so that it’s no longer a native app but an Electron web app.


This is amazing!

I'm saying that as a long-time user of a desktop setup consisting of Lin-Mac-Win boxes arranged left-to-right for at least two decades. Polyglot is to programming languages as multi-platform is to hardware. Fortunately, that's gotten easier as system-on-a-chip or SoC designs have proliferated in the last few years.

My current setup consists of 2x $250 Ryzen SoC Mac-mini copies straight outta Shenzhen and an M1 MBP.

I only wish that the once resilient world of open source KVM solutions such as synergy had not devolved into a recursive nightmare of forks where getting a working multi-platform open source software KVM without cost is challenging. Sadly, my current setup uses a good 'ole KVM switch but the button pressing is distracting.

I look forward to trying something like this again one day. Thanks for sharing!


If anyone wants to team up to commercialize this, I would pay for and handle the plastic injection molding and marketing and at-scale assembly and other things as needed. Email in bio.


If you commercialize this, please take care of this shortcoming:

> Both computers need to be connected and powered on for this to work

That's a deal breaker for me


How else are you intending it to work without that "shortcoming"?


The keyboard and mouse stay locked to whichever computer is on.


It already exists commercially. Search for boundless or borderless or roaming KM switch.


Having searched for that, most options I find are either ridiculously expensive, and/or poorly documented or limited. Any suggestion for good ones?

Frankly I'd be far more inclined to pay the "ridiculously expensive" prices for one that is well documented and open, and where the firmware is easily modifiable.


I make one that I put a lot of effort into documenting:

https://github.com/tiny-pilot/tinypilot

It's pretty easy to extend since it's just Python and vanilla HTML/JS/CSS, so there's not much of a toolchain to install.

You can buy it pre-made for $399 or make a DIY one for under $100.

https://tinypilotkvm.com/blog/build-a-kvm-over-ip-under-100


This seems to be a KVM switch, not a boundless/roaming KM switch?

Note no "V"; it's to have the mouse seamlessly move from one desktop to the other when the machines are each connected to their own screen. Browser-based is also a non-starter for that use.

I'll definitely have a look if/when I need a KVM over IP switch, though.


Ah, yes. My mistake.


Wow this is awesome. I use a KVM switch currently and it takes a solid 2-3 seconds and for that reason I find myself usually just SSH'ing into the other computer and having a tmux session instead.

Excellent work.


After going down the hellish rabbit hole of KVM and thunderbolt dock shopping, I started to fantasize about doing a project like this. So many horror stories of cheap electronics frying your ports, the switch adding input delays, etc. It's not that I didn't want to shell out the money, but it seemed like all the recommended solutions were either ancient (still had VGA connections) or were enterprise grade (close to $1000). I would have settled for a little robot arm that just physically unplugs one USB cable and plugs in another.

Essentially I found that the easiest way to swap between my computers is to physically disconnect a thunderbolt cable from one and plug it into another. As far as I can tell there's no such thing as a thunderbolt switch, so this is the local minima I'm stuck in until I try and make my own solution.


If you have a monitor that can serve as a USB hub (pretty easy to find) and has a thunderbolt input (less easy to find but there are options), you can hook multiple machines up to the monitor and use `ddccontrol` to toggle the monitor's active input. The devices hooked up to the monitor via USB can then follow the monitor to any of the connected computers.

I have my mouse, keyboard, and webcam plugged into my monitor. The monitor is connected to both my work laptop and personal desktop. I wrote a script using `ddccontrol` that I have bound to a hotkey on the laptop and desktop which toggles the active input. Switching the display and USB peripherals back and forth between the two machines is just a keyboard hotkey.

The commands look something like this: `ddccontrol -r 0x60 -w 3855 dev:/dev/i2c-7 >/dev/null 2>&1'

With the exact arguments dependent on your particular hardware.


Damn, I didn't know usb on monitor was a thing. This could work for me if I get a new monitor since I use a single display for multiple boxes. Maybe I could try Synergy too with the ddccontrol command


I use a software called Synergy.

https://symless.com/synergy

I have one keyboard and mouse connected to one "host" machine, and two machines connected as clients.

Sometimes if the host machine bogs a bit (like running a build or something) then the clients will have some latency but I've used this setup for gaming and work for two years and it's been pretty good.

My only complaint (about my personal setup, not the software) is that one machine has absolutely no peripherals attached to it aside from a monitor, so if I need to update the software, I need to connect a keyboard and mouse in order to do so.

Again, an issue with my setup and a caveat of using software as opposed to hardware.


This was indeed my first approach, but my employer disallows the use of synergy between personal and corporate devices (I could use it across two corporate devices though).


Thunderbolt 3/4 Switch for about $400 Canadian https://www.amazon.ca/Thunderbolt-Peripheral-Charging-Suppor...


That's what I do too. Thunderbolt is excellent, but it would be nice to not need to physically swap cables.


I had the same need and ended up using a USB Hub that required manual clicks to switch between devices. All software-based or network-based switches were a no-go in my case. I love the idea of a hardware-based switch that allows for seamless transitions between devices.

Who will pick up the gauntlet and allow those of us without a soldering iron to buy a ready-to-use box?



Does it work with custom/bespoke keyboard ? They often don't work in KVMs due to the HID emulation. I notice this Siig device notes to not use the numpad on the keyboard as well, on their homepage, which suggests a compromise.


The video in the Readme is well worth watching. I expected some kind of clicking to enable the kvm and switch devices. This is moving your mouse and keypresses across devices instantly. While I like Synergy, a hardware solution would work without much software and potentially much configuration.


Love the intro of the readme.

Also, it may be niche but I had the same thought in the past about this way being the solution for slow switching. Awesome to see someone did all of the work already. Now I just need to find someone selling it on AliExpress so that I won’t even have to lift a finger to have one :D


Seriously, if any VC is reading this, get this man some funding to make it a real project. Even at double or triple what it costs, it's still cheaper than any other commercial competitor.


If it gets really popular here on hacker news won't be long before chinese devices based on it start appearing. Or if someone is willing to invest $10-20k they could have devices ready to sell in less than 2-3 weeks.


> Or if someone is willing to invest $10-20k they could have devices ready to sell in less than 2-3 weeks.

Can you elaborate on this for someone unfamiliar with production? How one come up with the number and such time estimation?


With built-in networking so they can send your keylogs ;-)



Not every cool project needs to be a startup.


This. So much this. It's also really cool as a 'niche' project, and felt even approachable to someone like me who hasn't ever done more soldering than his first PS1 and a modchip.


I read some months ago that tinypilotkvm.com is doing JUST fine.

So yeah, sometimes niche markets can be profitable. And it doesn't have to be millions of dollars in VC money obviously to be invested.


Better make a Kickstarter or similar out of it. Don’t tie yourself to VC money if you can help it.


Level1Techs does the same thing for DisplayPort if you want fast monitor switching. Just be prepared for the price: https://www.store.level1techs.com/products/p/14-kvm-switch-d...


This doesn’t seem to do the mouse position-triggered switching?


Not sure why they posted that when Level1Techs does actually have USB KM with mouse roaming. https://www.store.level1techs.com/products/p/4-port-km-switc...


GP was indicating monitor switching, which your link doesn’t do. The equivalent of TFA for monitor switching would be full KVM switching when the mouse crosses the outer screen edge.


I'm referring to the fact that it maintains an independent connection to each monitor in order to facilitate fast switching. Almost no other DP switches do this.


Is there some documentation about this somewhere? I actually own both level1techs DP 1.4 KVM 4-computer/1 monitor switch and that new USB KM switch, so I'm familiar with their products.. but I'm not aware that their KVM does anything special other than support high response rates (where most KVM's only do 60hz) and passthrough USB properly.


I'm pretty sure I heard it in either an LTT or Gamer's Nexus video - most cheap switches simulate unplugging the cable from one computer and then plugging it into the other, so the monitor has to detect the new computer and negotiate and etc, usually takes a couple seconds for your desktop to appear. The Level1Techs one maintains an independent signal to each computer so that the monitor can start receiving a video stream immediately.


I have a similar usage and need. I do have a uGreen USB hub that has a button on top that I use to swap between computers - but it does have a slight delay.

I also discovered logitechs k860 keyboard which has 3 buttons on the top for switching between computers. I use it with the USB receiver and a bluetooth laptop. No noticeable lag and works very well.


I use a single monitor, keyboard, mouse for both work and personal and need to switch between these pain free. I haven't come across a seamless solution as most of the software ones rely on mulitiple displays. My current solution is 3 button press on each device (monitor, keyboard, mouse) to switch.


What hardware do you use to split the keyboard and mouse? I have the same situation but have different input devices for each machine and just change monitor inputs as needed.

Also, is it possible for one device to keylog when the keyboard is switched to the other?


My Targus keyboard/mouse support multiple devices and have a physical button to switch.


A kvm switch can reduce that down to 1 button press.


> All I wanted was a way to use a keyboard shortcut to quickly switch outputs, paired with the ability to do the same by magically moving the mouse pointer between monitors.

Most KVM switches have a keyboard shortcut (mine is scroll lock, scroll lock, 1/2). Mine also supports the mouse based switching but it's unusable because to work it needs to emulate a mouse with zero acceleration. Also this doesn't switch video.

I've had the same idea tbh but the inability to switch video and the software complexity put me off. A KVM switch is better (except the cost).


I have a KVM switch[1] and it's double middle mouse click to switch outputs. Works well with Mac, Linux or Windows.

[1]: https://www.amazon.co.uk/dp/B08GBXTW2Q?ref=ppx_pop_mob_ap_sh...


I recently put something together similar to this, to switch between my personal PopOS/Windows machine and my work Macbook Pro.

I used one of these manual USB switchers, (https://sabrent.com/products/usb-sw30), and connected its switch to a Raspberry Pi 4B via GPIO (4B is overkill by wanted hardwired network). There's a small separate keyboard (which will later be a macro keypad of some sort), connected to the Pi. Using inputexec (https://github.com/rbarrois/inputexec) to detect keypresses and then firing off a specific script to send a network request to the LG TV I use as a monitor to switch the source, and then set the GPIO connected to the USB switcher to high or low to switch the keyboard/mouse to the other machine.

I can also turn on/off the TV using the same WebOS API (and Wake-on-lan) as used during the source switch. A Kasa smart outlet also gets toggled to turn on/off a BenQ ScreenBar Halo (https://www.benq.com/en-us/lighting/monitor-light.html).

So with 4 different keypresses, I can switch to Work, to Personal, turn off monitor and light, and turn on monitor and light.


I literally installed Mouse without Borders this week! But hardware is better for secure login screens and the like. So, I still have a KVM switch. One thing I learned is that I don't want seamless mouse between two monitors.

So, I setup "holding" down CTRL which allows the mouse to pass. Its just a nice way to stop accidents and for when I want auto window sizing at borders. This project looks great if it can support holding down CTRL to allow the mouse to pass into the other screen.

I also love clipboard copy. That is kinda a biggie some days.


This is a really great idea! If you don't mind, I'll put this on a list of to-do features.

I was testing a "nudge" feature, where you need to move a mouse a little faster towards the other screen to have it jump across. It was not bad, even though I've found it to be most intuitive when the cursor simply moves freely like it was one big desktop.

Clipboard would be awesome to have, but considering privacy, security and data protection concerns, it's just too risky.


Just responding to the clunky and slow switching that is available. I have this wireless DELL mouse+keyboard set that switches quite easily and fast. Supports up to three devices (dongle + 2x BT). Dedicated key for tge switch, wirelss is instant, BT takes roughly 2 seconds.

I can't recommend it though, as the mouse scroll wheel broke pretty quickly, and it's apparently a common problem. Can't "warranty it" individually. I do like the keyboard so far.


Some dell monitors also allow switching video input via keyboard + mouse using the Dell Display Manager utility. You can set custom hotkeys for each input. I have a dell monitor as my daily driver and its my central monitor in a multi display setup simply because of the display input switching capability. Beats having to buy a expensive DisplayPort KVM.


That's pretty interesting, how long does the switch take?


Its about 2 seconds. Although, there is slightly longer delay when switching from a dell laptop connected to the monitor's HDMI input than the PC connected to the displayport input. I suspect it has something to do with the dell laptop going through a thunderbolt4 dock and outputting via HDMI.


I use a Nulea trackball and a Nulea keyboard. I bought two of the trackballs. The previous trackball I had, the scrollwheel was dying too often (for $60 it was kind of annoying) and the Logitech MX trackball, eventually the switch for clicking dies, and replacing it yourself is more than just a 2 minute task, not worth it for me).

I prefer just having two trackballs, especially since they don't move, they're very ergonomic. The keyboard is the style of a Microsoft Ergonomic Keyboard, but it supports multiple devices. The keys are exactly how I wanted them (flat), and its been a good keyboard, supports one USB dongle connection, and two bluetooth connections, which is what I wanted. I was surprised how good the keyboard is after passing on it on Amazon a few times, which led me to try their trackballs, and I was not disappointed with either purchase.

I prefer to just hard switch the keyboard, so I don't get confused as to which computer I'm going to be typing on, sometimes I switch computers to google something personal that I rather not type on a work machine.


This seems clever and useful enough to be turned into a manufactured product.


Here’s how I do it now, three machines two are linux and one is windows: I use Logetic MX master 3 mouse, it can connect to three devices via Bluetooth, if I need to switch from one to another, I click a button in bottom to switch it to the next one, and being wireless is very handy since one machine is far away from where I sit and it’s connected to a big screen.


I use a cheap 4-way USB port 2.0 sharing switch (for printers) that can be found on eBay for $10. I even used two chained together with another 2-way switch when I had 12 computers around me. You just press a single button corresponding to a single computer and all your keyboard/mouse events are going there.


Similar setup, I have a switcher that has my mouse/keyboard/microphone connected. One tap, switch between my Macbook and my Windows Desktop.


This looks great. I have a work PC and personal PC on the same desk but cannot install anything on the work PC. Would be great to declutter my desk with this.

Unrelated - surprised JLCPCB does not have a way to share a link to a PCB so folks can buy a board without needing to upload the files themselves. Maybe I am missing it?


I used to use Synergy for this until switching to Wayland, which isn't supported. Last time I checked there was a project called RKVM attempting to do the same thing for Wayland but it was very buggy at the time. I should check again to see if there has been any progress.


"lan-mouse" works for me on Wayland.


What if you want to switch ONE monitor, for example a 5K Apple Studio Display, between a Mac Mini and a MacBook?

Does a reliable solution exist that includes all accessories built in/attached to the monitor? (Ethernet, monitor speakers, monitor camera, power delivery charging, etc.)


My "dumb" solution here is that I've plugged all peripherals into a dock. I have a cable go from my dock to my Macbook or desktop. I have to physically replug every time but it's just the one cable for charging + data transfer so it is simple enough


I use this and it generally works fine: https://a.co/d/5vDBGMM . I had issues with getting full framerate and resolution until I tried a few different cables. The only issues I have are that sometimes the monitor will get all glitchy on one computer. Turning it off and on sometimes helps, restarting the computer sometimes help, and other times it just doesn’t work one day and works fine the next. Overall though I’ve only had the issue where it’s glitchy and I distorts the screen and I couldn’t fix it for that one day it happened ¯\_(ツ)_/¯

It hasn’t been enough of an issue to mess with it more or try a different one


I built something like this. Luckily my monitor has an IR remote control, which allowed me to record and replay control codes to switch inputs. I used a USB hub that also had an IR remote control for my keyboard/mouse, and I used a teensy with an IR LED to send codes to both the USB switch and monitor. I used an IR repeater/extender to route the IR signal from underneath my desk where the teensy/usb switch are to the back of my monitor where it can reach the monitor’s IR receiver. I also made a little NodeJS app that shares my clipboard between my computers. Although the whole setup is pretty hacky, it works surprisingly well.


How the switch via screen edge works if it doesn't need any progs installed on your computer? Doesn't the absolute mouse coordinate space need two identical monitors? And how it figures out when you are at the edge of the screen?


I’m wondering this too. How does it know the relative positioning of the two monitors?


Maybe it detects when the mouse is moving, but a given coordinate is always the same. So you reach an edge, and X is always the same, while y has some variability. So this means time to change to the other monitor.


It doesn't, the coordinates are always reported 0-32767 and the computer does the heavy lifting of mapping it to the physical screen geometry. This also takes care of the problem with different resolutions.


I've used a similar commercial implementation. They're sold as USB or KVM Synchronizer. Some will control 4 machines. The one I had was limited to 2x2 or 4x1 arrangements for the edge switching. Not ideal for a multi-monitor setup, but still pretty cool. I have future plans to combine it with an HDMI multi-viewer to setup a compact gaggle of machines.

They were quirky in their implementation, but it still felt cool to have it all done in a little USB switch device.

For my actual setup I still find barrier (forked as input-leap) excellent. I use Linux, Mac, and Windows machines without issue. I even play games with with my input going over the network this way.


I prefer x2x, which supports multiple Linux hosts very well.

https://manpages.debian.org/bookworm/x2x/x2x.1.en.html


Meanwhile I'm over here wishing I could make my Mac switch virtual desktops and windows quickly and seamlessly, but compared to Linux and even Windows, it feels dog slow. There's also a weird quirk of the AltTab app where sometimes you try to alt+tab back to a previous window, and the previous window+desktop appears, but the focus is actually still on the first window, so keyboard shortcuts go to the wrong app. You have to not only alt+tab, but then click on the window you just switched to, to change focus. Kind of insane that this basic desktop functionality doesn't work well on a $2,000+ machine.


This looks great! I need to look into it. For a little while I have used a combination of a KVM Switch and Mouse without Bordershttps://www.microsoft.com/en-us/download/details.aspx?id=354... to switch between my computer and the laptop I have on my desk. It would be great to have a local-only option. The application would need to copy the contents of my clipboard from one computer to the next, a feature I don't think I can live without.


This is awesome and it looks like the exact solution I've been looking for. That said, I'm way out of my depth when it comes to building this. What would it take to get a step by step tutorial on how to build this thing? I read through the readme, and there's some good info there, but a few things went over my head.

Never used a Pico board, only exp is with a Tensor board that came out a few years back.

Any further advice on where / how to get started with is would be appreciated?

Also great work, the transition looks super smooth.


Wow!! Very cool! I tried to use a KVM to switch from my personal macbook, work macbook, and gaming computer.... the hardware was awful, I had just ended up manually switching. The gaming computer had its own keyboard&mouse, so it was just switching the monitor (and there would be horrendous latency).

Anyway, I think this space has tons of low hanging fruit for improvement. And so many KVM products are insanely priced, and they're not even good.

Also how the ADuM1201 works is very cool!


Now it just need to be combined with something like https://github.com/haimgel/display-switch to do a DDC/CI monitor input switch as the USB activity moves around.

With a device like this you'd be missing the on_usb_connect event, but presumably you could do something (a special HID device button, an extra device id appearing, who knows) to make it work.


I wonder what anti-cheat rootkits think of this device. Intercepting mouse input and slightly modifying it is probably a hallmark of hardware cheats.


>> NOTE: Both computers need to be connected and powered on for this to work (as each board gets powered by the computer it plugs into).

It's not clear to me what would happen in the event that only one of the two computers was powered up. Would the powered pico pass the mouse off to a dead pico at the screen edge and then have no twin to pass it back, leaving the powered machine with no USB devices?


I use Barrier[1] and even with full software integration it sometimes gets things wrong (especially if you have a game or something else doing mouse capture); I'd be surprised if this can be solved entirely in hardware, but it sure looks amazing.

https://github.com/debauchee/barrier


I recently had the idea of making similar hardware with ESP32 (some of them has USB hardware). You may lose mouse acceleration, but many do not like this to begin with, so it's fine.

Does absolute mouse work correctly when two systems have very different (total) resolution? For example, one is a laptop with a single screen, and another one is a desktop with three screens.


Absolute mouse "works" in any situation. You are responsible for reporting the physical and logical min/max values for the mouse. The host translates these into screen coordinates.

So if you report the max x/y as 32767, and the current x/y as 32767, the host will translate it to the corner, regardless of size of screen.


How does absolute mouse work? The mouse hw just reports delta x/y and has no idea how the corners of your screen map to your desk surface. So it sounds like special hw. or very frequent recalibration of “corners” after moving mouse when machine is off or lifting+moving (which would essentially be what would happen when using it on machine 2)


It is not putting your mouse itself in absolute mode (only graphics tablets really operate in absolute mouse mode). It's just outputting absolute mode reports to the host.

Absolute mouse HID report has a logical/physical min/max, not just delta. Regardless of size of screen, min/max correspond to the boundaries in absolute mode.

So it's just keeping track internally of the incremental relative accumulation of your mouse as you move it, and i assume, when you hit the min/max, swapping screens.

I assume it's reporting a high enough min/max resolution to make this not happen crappily.

The polling rate on mice is usually only 125hz (8ms), so it has plenty of time to handle the input.

Even "gaming" mice are usually only 1000hz (1ms).

I would guess, looking at it, that it takes a few microseconds to handle the mouse moves, max.


As I understand GPIO speed is limited and below usb 2.0 speed if I am not mistaken. So what is the maximum speed of this setup? How ‘gaming” gaming mouse can be?


You are talking transfer rate but these are polling in most cases. The gpio can easily handle 1000hz. It can 66 thousand times that speed in fact. The amount of processing they do is negligible and probably amounts to a few microseconds delay at most.

Even with a non polling mouse there would be no point in reading the result more than a thousand times per second. If you move the mouse 3 inches per second (quite fast) and you only process 1000 reports a second you would still achieve a resolution of 0.003 inches.


From a quick google search (to make sure I'm not just stating my memories, but actual facts) the RP2040 can toggle a GPIO at about 66MHz (via its PIOs. Otherwise a bit slower, and using more CPU). USB 1 is 1.5 or 12Mbps, so you should have no issues even if you bit bang it.

Despite the USB protocol overhead, it is plenty even for a gaming mouse. Pretty sure there's no point polling it at above 1 kilohertz or so.


with all the people switching USB-devices collected here: I also have an USB-switch to handle work/private machines (as well as the odd usually headless VM).

Oddly, there is no delay on switching with Windows. Devices are registered instantly and I can type. Linux needs 1-2 seconds... and I just don't know why. Anyone has an idea what to tune?


One of the coolest hack projects I've seen in some time. Looking at the schematics took me back to my electronics technology class, learning the value of heat syncs and accidentally setting amps on fire :,)

Having an accompanying explainer article or video is something I'd pay/donate for, just out of sheer curiosity of the work involved.


Thank you so much for the kind words. I'm hardly an expert but I will try to write something when I find some extra cycles. It was done to fix a problem I was seeing on a daily basis, but then I figured out it might help others (also gave me an excuse to practice kicad and 3d modelling).


How do modern KVMs address OSes thinking an HDMI or USB device is unplugged when switching? I’ve never found a solution that actually works because of this issue.

It seems this only addresses KB/Mouse by keeping them enumerated on the host PCs at all times and just sending no inputs to one. So that feels fairly solved. But what about monitors?


I've found this really depends on the monitor. My Samsung gaming monitor hates this, while the plain Dell ones I have will switch around decently.


I really like the idea of a hardware solution for a problem like this, as opposed to a software solution.


Nice work! If DeskHop could be made to work with a Bluetooth mouse, it would be even better. FWIW I was looking for a similar solution recently. I've got a magic trackpad, keyboard, bluetooth mouse, and monitor. I'd like to swap between 2 computers somewhat easily.


I'm in a similar position: I'm on Windows and have a mouse that supports multiple Bluetooth connections and can be made to switch between computers with the Mouse and Keyboard Center but the keyboard only connects to one computer at a time so I'm stuck using two identical keyboards and moving them around physically.

Also another pet peeve with M&KC is that it will also switch when the other computer is off, which happens more often than I'd like and leaves the mouse "stranded" (forcing me to turn it over and press the Bluetooth button to cycle through the three channels).


Have been searching for a Bluetooth solution to switch my keyboard+mouse between multiple devices. Only found Logitech MX keys - pricey.

Maybe it could be implemented using Raspberry Pico? I think I found me a new side project!


Another solution is to simply run a VNC server on one of the desktops, and a VNC client on the desktop that has your keyboard and mouse attached.

This is super flexible, as that computer can now be in another room or building.


This is great, but why use raspberry pi? Seems like the same functionality would be easier and more robust using an embedded-type system like Arduino. Teensy boards in particular can act as USB hosts.


It's not a full Raspberry Pi, but their RP2040 microcontroller based board. Teensy boards are awesome but they are kind of pricey. This one is 4-5$, it's in stock everywhere, and what's usually the most important reason for making such decisions - I had two lying around from a previous project :-)


Most times, the answer to these types of questions on hobby projects is that the maker either knew more about Pies than Arduinos, or simply had a Pi lying around and not an Arduino in their home when inspiration struck, heh.

I've certainly been guilty of doing something "a worse way" simply because it's what I first thought of and was available to me, and you gotta strike while the mental iron's hot.


These are Raspberry Pi Picos, they are embedded type devices and not the usual Pis you're used to. The keyboard I'm using right now uses the same chip (RP2040) as the Pico, runs QMK and seems to be more performant (flashes faster anyway) than the normal microcontrollers you tend to get in plancks and the like.


It uses a Pi Pico, not the Linux SBC. Arduino-tier.


Ah! Didn’t catch that, thanks.


Why not use Remote Desktop? I work on multiple computers on one laptop and if your network is fast enough it’s silky smooth. For linux I use VNC and it works well but isn’t as nice as RDP.


Because that doesn't do the same thing. The point is to have two monitors connected to separate machines, and use the same mouse and keyboard to control both of them.


RDP still still like it would be a better solution, one mouse and keyboard for both PCs and not only that you could have both PCs dual screened.


The point is you don't always want both PCs dual screened. I have my setup prepared for both (using Synergy and a KVM switch): Sometimes I need the screens to show each separate machines desktops, but want to be able to quickly switch keyboard/mouse between them. Sometimes I want one machine to occupy both.

For the latter a hardware KVM switch is vastly superior to RDP. For the former, no RDP server/client I know of provides a solution.


I'm still not sold. RDP does all the configs you've mentioned, dual screen, single screen, being able to see both screens at the same time plus there is the very nice feature of being able to copy paste between computers and peripheral passthrough.


I've not seen an RDP client that provides the capabilities you're describing without e.g. having one of the machines control both screens and putting an RDP client full-screened on one of them, and because of the stutter and CPU overhead I get even with a hardwired network connection that's not a viable option.

I'd be overjoyed if there was a reliable way to do this, but it will need to have each machine controlling it's own screen and pass mouse events between them, similar to how synergy does - having one or both of them rendering desktop of the other is way too laggy, even hard-wired.

I also need a solution where I can disconnected either machine at any time without disrupting anything, which rules out a solution where one machine controls both screens, or where the keyboard and mouse is only physically connected to a single machine.

If there are any RDP clients which can work together to pass mouse events between them the way Synergy or this hardware hack does, I'd be overjoyed (but neither will replace my KVM switch for the occasions I want one machine to control both screens)

> plus there is the very nice feature of being able to copy paste between computers and peripheral passthrough.

Synergy also provides the copy-paste (though I'd actually prefer not to be able to, as I use it between a personal and work machine I don't want to pass more than the bare minimum of data between), and the KVM switch provides the peripheral passthrough.


In many cases remote desktop is a great solution. However, a hardware based KVM can be preferable for several reasons.

Security: remote desktop requires the machines to be on the same network.

Performance and compatibility: hardware accelerated rendering often does not play nice with remote desktop.


I have used Remote Desktop through private VPNs and have been able to connect to my workstation from cities away and performance has been good enough to do video editing and some 3D work.


RDP is really great compared to other solutions like VNC or Xserver. Im really sad there is nothing similar for Linux. Anyone?


I've been using Synergy with my mac and windows desktop, and in the past I've used Input Director between two windows machines. It was good enough to game on LAN parties.


What I really need is this + monitor input switching. I want to use both my monitors with both computers and just be able to hit a single button to swap everything.


My m32u monitor has a built in kvm switch and I switch between my Mac and pc with a button push. Monitor/keyboard/mouse and usb speakers


Many KVM switches do this, just search Amazon for KVM switch + HDMI/Display Port, but they're often not great in my experience. My last one only lasted a couple of years and would sometimes fail to pick up my monitor.


https://github.com/haimgel/display-switch might be a piece of what you need to get this working.


When I worked at Virtu we had all the desks on wheels, pull the plug and roll away. Even better than switching. We moved them around all the time.


This is really impressive. Interesting to see a no-fuss hardware-only solution out there for this! I never thought it was possible. Nice work!


very nice. For apple-only users there is a built-in option to connect your macs in the same manner called "universal control".


Very cool! Take my money :) In my case I would like to share mouse, keyboard and monitor. So, just switching between two laptops.


Have you considered using the special chars (caps lock) to switch both mouse and keyboard from PC A to PC B, and vice versa?


Where can you get these parts in US? I can probably order the pico, but others seems hard to find.

(or is the answer AliExpress)?


For the electrical components, Digi-Key[1] and Mouser are the two go-to’s. I didn’t read 100% of everything, but unless he’s selling the PCB’s you’ll have to get them fabricated from the Gerber files in the repo. JLC is the go-to for this - expect to pay $5-$10 for a single-sided design like this, and you’ll probably get free shipping if it’s your first order.

1: ADuM1201 - https://www.digikey.com/en/products/base-product/analog-devi...


It still blows my mind that I can order a few custom boards from JLC and have them in < 1 week for < $25 with international shipping included.


I believe you should have no difficulties finding these in the US - try Newark, Mouser, DigiKey, Arrow.


hey if you end up ordering the parts, can you share the links? I'm having a hard time finding anyhting but the pico and "ADuM1201BRZ"


This is so cool, kudos to you for sharing


I experienced a very unusual bug with a Tripp Lite KVM once because a feature like this was baked in.


Shut up and take my money :) Fun aside: this is awesome. I would like to buy one preassembled


Is there any such solution that allows to use Windows Precision Touchpad gestures?


I generally use barrier it is a software solution like synergy


At first glance I thought this was going to be a reinvented Sun Ray!


Is there a way to connect three computers using DeskHop?


Not yet, but it's in the roadmap :)


Wow. This looks just like what I been wanting for a while.


Did this back in '99 with a program called x2vnc.


Omg I wanted to build exact this. Thank you!


anyway to have this work on a mac and android tablet?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: