AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
esp32/include/ble_keyboard_adapter.h
Go to the documentation of this file.
1#pragma once
2// clang-format off
3// BleKeyboard.h must precede i_ble_keyboard.h: defines ESP32_BLE_KEYBOARD_H guard
4// that prevents duplicate key constant definitions in i_ble_keyboard.h.
5#include <BleKeyboard.h>
6#include "i_ble_keyboard.h"
7// clang-format on
8
18{
19 BleKeyboard& kb;
20public:
26 explicit BleKeyboardAdapter(BleKeyboard& kb) : kb(kb) {}
27
33 void begin() override { kb.begin(); }
34
40 bool isConnected() override { return kb.isConnected(); }
41
47 void write(uint8_t key) override { kb.write(key); }
48
54 void write(const MediaKeyReport key) override { kb.write(key); }
55
61 void print(const char* text) override { kb.print(text); }
62};
63
Adapter that implements IBleKeyboard interface using BleKeyboard.
void print(const char *text) override
Sends a text string.
void begin() override
Initializes the BLE keyboard.
void write(uint8_t key) override
Sends a single key press.
BleKeyboardAdapter(BleKeyboard &kb)
Constructs a BleKeyboardAdapter.
void write(const MediaKeyReport key) override
Sends a media key report.
bool isConnected() override
Checks if BLE keyboard is connected.
Interface for Bluetooth LE keyboard functionality.
BleKeyboardAdapter * createBleKeyboardAdapter()
Creates the platform-specific BleKeyboardAdapter instance.
uint8_t[2] MediaKeyReport
Type alias for media key reports.