I made something similar as a toy project after being frustrated with Synergy/Barriers poor support for my keyboard layout (Czech).
It's for Linux only as it relies on udev and the encryption (AES with a key derived from a password shared between clients and server) is not ideal, but it was a fun project for sure.