How ironwolf437/esp32-hid-keyboard works
ESP32 BLE Keyboard is an Arduino library that lets a sketch emulate a Bluetooth HID keyboard. The main workflow is: a sketch starts the service, checks for a connection, then sends text or key actions; the library maintains keyboard or media-key reports and transmits them through BLE HID to a paired host. The README also documents modifiers, multimedia keys, and press/release controls. Internal details are based on partial source excerpts, so uncertain callback and report wiring is omitted.
Main entry points: BleKeyboard.cpp Keyboard runtime · BleKeyboard.h Keyboard API
Components 7
Sketch API
- Keyboard API
src/BleKeyboard.h - Keyboard runtime
src/BleKeyboard.cpp
HID Reports
- Key reports
src/BleKeyboard.cpp
BLE HID
- HID service
src/BleKeyboard.cpp - ESP32 BLE stack
Other components
- Arduino sketch
- Paired host
Connections 7
- Arduino sketch → Keyboard API: calls API
- Keyboard API → Keyboard runtime: invokes
- Keyboard runtime → Key reports: updates reports
- Keyboard runtime → HID service: starts service
- Keyboard runtime → HID service: sends reports
- HID service → ESP32 BLE stack: uses BLE
- ESP32 BLE stack → Paired host: advertises HID