I want to connect to a RPi thought LAN (possibly with VNC) and have it controlling a server that is connected to the RPi by USB.

Basically the RPi would have to send every keystroke/mouse movement to the server using the USB emulating the keyboard/mouse.

(I intend to gather the server image by using a VGA to USB card connected to the RPi, but that part seems simple).

Is this possible? What packages do you propose?

Mind that I can't install anything in the server (I want to control the server when it boots, not when I'm already booted, for that part I just SSH into the server and bypass the RPi).

Also, I don't need high performance, I just want to be able to control the server in case it doesn't boot by some reason or in case I need to change some BIOS setting and I don't want to be carrying a monitor and keyboard around with me.

3 Answers 3


Only the Raspberry Pi Zero , Zero W , Model A and Compute Module can act as USB device. Other models can not act as USB device. This is a hardware limitation which cannot be worked around in software.

You will not be able to make the Pi act as PS/2 keyboard or mouse. Not with the GPIO pins, that is.

Here is a guide for turning the Pi Zero into an USB keyboard/mouse using ConfigFS :


  • 1
    I see. I did find a project aiming to do that. It uses both a RPi B and a Zero, for what I know exactly for the purpose you describe: github.com/Fmstrat/diy-ipmi
    – jbssm
    Commented Apr 15, 2018 at 16:55

The Raspberry Pi 4 has OTG capabilities on its USB-C Port. You can free that up by powering the board using the GPIO pins.

Since the Pi already has a camera input, you probably get a better picture with something inputting video to the camera head. There are several boards on Ali express that do that (search HDMI to CSI-2, if you really need VGA, you could use a VGA to HDMI adapter). There are multiple examples out there on how to incorporate a the camera input on a website. Among others the OctoPi software does that so you can remotely view your 3D printer working.


I am also looking to control a windows 10 computer with a raspberry pi4, as a mouse and keyboard. I already have the power thing handled, with a usb power blocking but data through connector. I am just looking for the code to do this.

I am looking to put coordinates in, and click on the location, then type in information received at the raspberry pi. I am hoping micropython or circuit python can do it.


Steve C.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.