The code creates a bluetooth bispositive that emulates the keyboard
Feature | Description |
---|---|
Emulation of a specific key | You can emulate a specific key for example 0xE3 <-- is the windwos key |
Writing text | You can emulate the keybord for writing text |
- Arduino IDE
- ESP32-S3
Inside the code you can change
- The button pin for trigger the emulation
- The name that the bluetooth device will have
- The message you will send
- Ande the specific key you want emulate
#define BUTTON_PIN
#define DEVICE_NAME "ESP32 Keyboard"
#define MESSAGE "Hello from ESP32\n" // Message to type
// The rest of the code
void loop()
{
if (digitalRead(BUTTON_PIN) == LOW)
{
if (isBleConnected)
{
// Example: Press the Windows key
pressFunctionKey(0xE3); // 0xE3 is the HID code for the Windows key
//typeText(MESSAGE);
}
}
}