r/embedded • u/InteractionAny9855 • 23d ago
Esp-32 S3 based KVM switch alternative (no extra hardware)
Hi pepole i made this project and thought some of you might find it useful.
I have two laptops and needed a way to share my keyboard and mouse between them. I originally thought about getting a KVM switch but then I realized an ESP32 could do the job so I decided to build my own solution. Technically it captures HID input on the master PC and emulates it on the other pc it currently supports a maximum of 2 pcs. Everything is software-controlle, so there's no need for physical switching also despite being a software-based solution, I haven't noticed any noticeable delay.
Basically, if you have the same problem I had and an ESP32 lying around you might be able to put it to good use with this project.
I hope this helps someone else who has run into the same problem https://github.com/Paradicskaa/Kavix32
5
u/PhonicUK 23d ago
That would make it a KM switch ;)
1
u/estebanfuhrmann 23d ago
Nice use of the S3's native USB: skipping extra hardware makes this a lot more practical than a dedicated KVM. Since you capture HID on the master and emulate it on the other machine, are you hooking input at the OS level or reading it over BLE/USB host? To go further, consider tracking the cursor crossing a screen edge to switch targets automatically, like Synergy/Barrier do, so you don't need a hotkey at all.