Using Raspberry Pi 400 keyboard PC as a USB keyboard for your PC

Let’s try not to get confused, but you can now use Raspberry Pi 400 keyboard PC as a standard USB keyboard, optionally with a mouse attached to it, for your computer, or twisted minds may even connect it to a Raspberry Pi SBC… “But why?” you may ask. Because we can.

That’s now possible thanks to work from Phil Howard (Gadgetoid), software lead of Pimoroni, and his Pi400kb project which implements a raw HID keyboard forwarder that turns the Raspberry Pi 400 into a standard USB keyboard.

Raspberry Pi 400 USB keyboardAll you need to do is to find a USB-C to USB-A cable to connect the Raspberry Pi 400 to one of the USB ports on your computer, change some Raspberry Pi OS configuration, and install and run pi400kb.

  1. Add dtoverlay=dwc2 to /boot/config.txt in order to use the dwc2 USB device/gadget mode, and reboot your Pi 400
  2. Load the libcomposite kernel module, get pi400kb binary, and run the program as root:
  3. All good! Try typing on your Raspberry Pi 400 keyboard PC to this if that works

You could also connect a USB mouse to the Pi 400 to save on a USB port on your computer, as both HID events from the keyboard and mouse will be forwarded to the PC. Press Ctrl+C to exit the program

If you prefer to build pi400kb from source, you run the following commands in Pi 400 keyboard computer:


It does not make a whole lot of sense to use a Raspberry Pi 400 as a USB keyboard, but it could still be useful as a stopgap. For example, if your keyboard stops working, you could always replace it with the Raspberry’s keyboard (PC) until you get a new proper keyboard.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
8 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications