examples/device/hid_boot_interface/README.md
A composite USB HID device that exposes a boot-protocol keyboard and a boot-protocol mouse as two separate interfaces.
| Interface | Class driver |
|---|---|
| 0 | HID (boot keyboard) |
| 1 | HID (boot mouse) |
Notable tusb_config.h settings:
#define CFG_TUD_HID 2 // boot keyboard + boot mouse
#define CFG_TUD_HID_EP_BUFSIZE 8
CMake:
mkdir build && cd build
cmake -DBOARD=raspberry_pi_pico ..
cmake --build .
Make:
make BOARD=raspberry_pi_pico all
After flashing, the board enumerates as a keyboard and a mouse. Press and hold the button: the host receives repeated Right Arrow key presses and the pointer drifts toward the bottom-right. Because it uses the boot protocol, the keyboard also works in a BIOS/UEFI menu.