For the server side, you'll either want a USB to serial adapter with a microcontroller in between, or one of the RP2040 Raspberry pis as it can be both those at once.
https://www.waveshare.com/rp2040-zero.htm
Actually you can probably do it with two RP2040s (or maybe just one) as their USB ports I believe can be configured for different roles.
What you want to do is make sure your client device is an HID device, so that it's recognized as a keyboard. I think something like this will do: https://makerspot.com/cp2110-usb-hid-to-uart-serial-adapter/
For the server side, you'll either want a USB to serial adapter with a microcontroller in between, or one of the RP2040 Raspberry pis as it can be both those at once. https://www.waveshare.com/rp2040-zero.htm
Actually you can probably do it with two RP2040s (or maybe just one) as their USB ports I believe can be configured for different roles.
Good luck, and share your results!