If so, neat idea, and I've done stuff like that before. You can even have the client appliances be configuration free -- they announce themselves to the network and the server pushes out after pairing.
Interesting and fun to build, but I don't quite see the use of such a thing. It would still require running the barrier server on your laptop. I'd try to possibly go a different direction: A cheap device (RP2040 based?) that sits in between an external keyboard and your laptop. Other copies of the same hardware plug into the usb ports of other computers you'd wish to control.