Using ESP32 as a bluetooth CLASSIC keyboard - I need a code

Hi there. I am trying to find how to use a Bluetooth classic connection to smartphone with ESP working as a simple keyboard. I have problems with compiling code for HID and Bluetooth Classic. Tried IDF profile and Arduino and some example code and still not working.
Has somebody working piece of code for that configuration?
I need classic Bluetooth because BLE has to short range for me.

You can easily take the ESP-IDF example for Bluetooth Classic + HID mouse

https://github.com/espressif/esp-idf/blob/v5.5/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device

Then change up the HID descriptor to be a keyboard instead of a mouse, based on

https://gist.github.com/manuelbl/66f059effc8a7be148adb1f104666467

And then you get a working Bluetooth Classic HID keyboard

https://github.com/maxgerhardt/esp32-btc-hid-example

It can pair with my PC perfectly fine and types ‘a’ once every two seconds.