Use the Beetle BLE as an HID keyboard

Hello,
I would like to use my Beetle BLE as a bluetooth HID keyboard to do a very simple thing : When I press a button, the card send the key « space ».
I already done this with a leonardo by USB connection but it was different because the uc of this card is HID ready :

On the Beetle BLE, there is an arduino UNO chip (that doesn’t support HID) connected to a bluetooth HID chip (cc2540).

In the console of the arduino IDE, I can tell to the beetle to be in « transparent mode » to communicate directly to the UNO chip.
I also can tell it to pass in HID mode. It works with “AT commands”

Now, I have no Idea how to code my program.
I tried to send this code from the arduino exemples :

void setup() {
    Serial.begin(115200);               //initial the Serial
}
 
void loop()
{
Serial.write(45); // send a byte with the value 45

  int bytesSent = Serial.write("hello");  //send the string "hello" and return the length of the string.

}

and I passed the chip in HID mode.
Next I connected the device to the bluetooth of my phone, enter the note app… nothing happened.

Thanks in advance for your help,
Trit

Hello,

That sounds difficult to deal with this problem with this chip.
My goal is to have the smallest circuit to send bluetooth key to my computer.
If you know other chips that can do that it’s ok too.

Thanks,
Trit