ESP32 Bit Pirate home
  • USB
  • Beginner
  • 5 min
  • Serial CLI

Recipe · Beginner · USB

How to press a USB HID gamepad button

Use USB gamepad mode to send a single HID button press such as A, B or LEFT to a connected host.

USB HID keyboard and mouse controls.
A practical ESP32 Bit Pirate recipe based on documented firmware commands.
Step 1

Commands

Run this sequence from the CLI. Adjust pins, addresses or filenames to match your own setup.

Result

What it means

A single gamepad press verifies HID enumeration and the gamepad path separately from keyboard and mouse commands.

Troubleshooting

  • Re-enter the selected mode setup if pins changed.
  • Confirm the target shares ground with the ESP32 Bit Pirate.
  • Start with short commands before using longer capture or bridge sessions.

Next steps

  • Try keyboard and mouse HID after gamepad works.
  • Use reset if the host keeps a stale USB state.
  • Document which host OS recognizes the HID profile.

USB HID gamepad FAQ

What does gamepad mode send?

It sends a single USB HID gamepad button event, such as A, B or LEFT, through native USB to the connected host.

What does a gamepad button action send?

It sends a USB HID gamepad report to the connected host. The host interprets that report like input from a physical controller, depending on the active application and OS mapping.

How should I test HID gamepad safely?

Test on your own host, open a harmless input tester or gamepad settings panel, and avoid sending buttons to software where a single action could trigger unwanted changes.

Go deeper