keyboard emulator using bluetooth on a ESP32

hey guys
so ive been working on a project where I use a rotary encoder as a bluetooth controller.
I've already used it to write to the serial monitor like if i turn clockwise it says clockwise and vice versa.
what I want to do now is have my lolin32 lite act like a bluetooth keyboard,
it will send a w if i turn clockwise.
I've searched for a couple of hours but I've found nothing that works yet.
kind regards
Ethan