This is made mainly to test if your board supports sending them.
This code uses the ESP32-BLE-Keyboard library.
To avoid the ESP not sending the commands after a reconnection, please use at least version 0.3.1-beta and uncomment #define USE_NIMBLE on the first line of BleKeyboard.h.
You will also need to install the NimBLE-Arduino library by h2zero inside the Arduino IDE.
In order to receive the commands, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone: