Hi! What you're doing looks kind of right, but you'll also need the code to enable HID mode and to send the HID report in the right format (it's usually an array rather than a single byte).
What I've done is used the HID report that's normally used for keyboards - but modified it so that instead of saying 115 is the maximum keycode sent, it says 255 is, so you can then send 0xF1.
I'm not sure if that'll do it, but it's worth a try. Failing that you could see if you can get the report descriptor your actual Lenovo keyboard uses, and then copy that
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi! What you're doing looks kind of right, but you'll also need the code to enable HID mode and to send the HID report in the right format (it's usually an array rather than a single byte).
What I'd suggest is to use the existing HID keyboard example as a base: http://www.espruino.com/BLE+Keyboard - and the library is http://www.espruino.com/modules/ble_hid_keyboard.js
So something like this might work:
What I've done is used the HID report that's normally used for keyboards - but modified it so that instead of saying 115 is the maximum keycode sent, it says 255 is, so you can then send 0xF1.
I'm not sure if that'll do it, but it's worth a try. Failing that you could see if you can get the report descriptor your actual Lenovo keyboard uses, and then copy that