All Projects → Gadgetoid → pi400kb

Gadgetoid / pi400kb

Licence: MIT license
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to pi400kb

Keyberon
A rust crate to create a pure rust keyboard firmware.
Stars: ✭ 355 (+95.05%)
Mutual labels:  keyboard, usb
hidstream
Streaming HID events in Node.js
Stars: ✭ 52 (-71.43%)
Mutual labels:  keyboard, hid
Ucr
Universal Control Remapper [Alpha]
Stars: ✭ 399 (+119.23%)
Mutual labels:  keyboard, hid
openinput
Open source firmware for input devices
Stars: ✭ 43 (-76.37%)
Mutual labels:  keyboard, hid
Nrf52 Keyboard
A ble keyboard firmware using nrf52810/52832
Stars: ✭ 168 (-7.69%)
Mutual labels:  keyboard, usb
SerialProxy
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)
Stars: ✭ 39 (-78.57%)
Mutual labels:  keyboard, usb
Pxt Bluetooth Keyboard
BLE HID Keyboard module for micro:bit
Stars: ✭ 44 (-75.82%)
Mutual labels:  keyboard, hid
Usbdevice
Highly flexible Composite USB Device Library
Stars: ✭ 144 (-20.88%)
Mutual labels:  usb, hid
Hidusbf
USB Mice Overclocking Software (for Windows)
Stars: ✭ 152 (-16.48%)
Mutual labels:  keyboard, usb
Karabiner Driverkit Virtualhiddevice
Stars: ✭ 108 (-40.66%)
Mutual labels:  keyboard, hid
nucular-keyboard
USB Keyboard Adapter for old ThinkPad keyboards
Stars: ✭ 27 (-85.16%)
Mutual labels:  keyboard, usb
python-hid-parser
Typed pure Python library to parse HID report descriptors
Stars: ✭ 31 (-82.97%)
Mutual labels:  usb, hid
rasp vusb
This repo explains how to turn your Raspberry Pi Zero into USB Keyboard and Mouse. Also provides sample code and binaries to control them.
Stars: ✭ 85 (-53.3%)
Mutual labels:  keyboard, otg
nrf52-keyboard
A BLE & 2.4G Keyboard Firmware using nrf52810/52811/52832
Stars: ✭ 101 (-44.51%)
Mutual labels:  keyboard, usb
Authorizer
Authorizer is a Password Manager for Android. It emulates an HID keyboard over USB and enters your credentials on your target device. Additionally it supports OTP 🔑📴
Stars: ✭ 172 (-5.49%)
Mutual labels:  usb, hid
Rubber Ducky Library For Arduino
An Arduino library that allows you to use a cheap Arduino (Leonardo) as a Rubber Ducky
Stars: ✭ 25 (-86.26%)
Mutual labels:  keyboard, usb
Android Usb Gadget
Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
Stars: ✭ 118 (-35.16%)
Mutual labels:  usb, hid
Hidguardian
Windows kernel-mode driver for controlling access to various input devices.
Stars: ✭ 138 (-24.18%)
Mutual labels:  usb, hid
Minikbd
Stars: ✭ 97 (-46.7%)
Mutual labels:  keyboard, usb
EspTinyUSB
ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
Stars: ✭ 375 (+106.04%)
Mutual labels:  usb, hid

Raspberry Pi 400 as a USB HID Keyboard & Mouse

Hook your Pi 400 up to your PC somehow, using a USB Type-C cable into the power port. Anker make good ones- I used a 3m white one for my tests.

Our USB-C to USB-A is great if you're using a USB-A port (but make sure it's a high power one): https://shop.pimoroni.com/products/usb-c-to-usb-a-cable-1m-black

A Raspberry Pi Mouse is also supported if plugged in, eg: https://shop.pimoroni.com/products/raspberry-pi-mouse?variant=29390982119507

This project started out life as a gist - https://gist.github.com/Gadgetoid/5a8ceb714de8e630059d30612503653f

Thank you to all the people who dropped by with kind words, suggestions and improvements.

Quickstart (Ish)

Add dtoverlay=dwc2 to /boot/config.txt

Reboot!

sudo modprobe libcomposite

Grab the latest pi400kb for your system from releases: https://github.com/Gadgetoid/pi400kb/releases

chmod +x pi400kb

sudo ./pi400kb

YOUR PI 400 IS NOW A FREAKING KEYBOARD & MOUSE FOR YOUR PC WHAAAAT!?

Your keyboard input will be detached from your Pi while it's forwarded to your host computer.

Press Ctrl + Raspberry to grab/release your keyboard and mouse, switching between local use and USB.

Press Ctrl + Shift + Raspberry (on the grabbed keyboard) to exit.

Mouse Support

Pi 400 KB supports the official Raspberry Pi Mouse VID:PID = 093a:2510 by default, but other mice should work.

Autostart

sudo cp pi400kb /usr/sbin/pi400kb
sudo systemctl edit --force --full pi400kb.service

Add the contents of the pi400kb.service file.

Start the service and check its status:

sudo systemctl start pi400kb.service
sudo systemctl status pi400kb.service

Enable start on boot if it's okay:

sudo systemctl enable pi400kb.service

Building & Contributing

Building

sudo apt install libconfig-dev
git clone https://github.com/Gadgetoid/pi400kb
cd pi400kb
git submodule update --init
mkdir build
cd build
cmake ..
make

Custom Mouse/Keyboard Devices

CMake accepts the following build arguments to customise the VID/PID and device path for the mouse/keyboard:

  • KEYBOARD_VID - Keyboard Vendor ID, default: 0x04d9
  • KEYBOARD_PID - Keyboard Product ID, default: 0x0007
  • KEYBOARD_DEV - Keyboard device path, default: /dev/input/by-id/usb-_Raspberry_Pi_Internal_Keyboard-event-kbd
  • MOUSE_VID - Mouse Vendor ID, default: 0x093a
  • MOUSE_PID - Mouse Product ID, default: 0x2510
  • MOUSE_DEV - Mouse device path, default: /dev/input/by-id/usb-PixArt_USB_Optical_Mouse-event-mouse

Supply these arguments when configuring with CMake, eg:

cmake .. -DMOUSE_DEV="/dev/input/by-id/usb-EndGameGear_XM1_Gaming_Mouse_0000000000000000-event-mouse" -DMOUSE_VID=0x3367 -DMOUSE_PID=0x1903
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].