It should be possible, but I'm not quite sure how you'd do it - as you say it'll be down to getting the correct HID report sent out.
Probably the easiest method would be to find something (like the Bluefruit device) that does it, and then see if you can find the HID report for it (you might be able to grab is via an app like nRF Connect)
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.
It should be possible, but I'm not quite sure how you'd do it - as you say it'll be down to getting the correct HID report sent out.
Probably the easiest method would be to find something (like the Bluefruit device) that does it, and then see if you can find the HID report for it (you might be able to grab is via an app like nRF Connect)