I have used Adafruit nRF52840 boards with Arduino and CircuitPython. Adafruit uses a different BLE protocol stack.
For other vendor ESP32 and ESP32-S3 boards I have used
GitHub - T-vK/ESP32-BLE-Keyboard: Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible). Not sure if this works on the Nano ESP32 board. I use NimBLE-Mode which results it much smaller code than the default.