The server is the more complicated side, as its need to receive the client input and convert to the system signals to emulate real keyboard/mouse events. For this, I’ve done some tests using Xlib, with successful results.