ESP32 HID controller

Hey guys
So i need to do a project for school using the arduino IDE.
i want to make a bluetooth controller using a rotary encoder (EC11).
And my teacher suggested to use a LOLIN32 lite.
I have been able to connect my rotary encoder to my arduino,
but now i need to send a "W" to my pc if it detects a HIGH.
I did some research and I found out you can use your esp32 device as a HID BLE keyboard.
Does anyone know how to use a ESP32 as a bluetooth keyboard?
Kind regards