It looks to me like ble_hid_keyboard and ble_hid_controls might be mutually-exclusive. Is it feasible to send commands in both "mechanisms" without a rewrite of those modules?
In the Adafruit Bluefruit LE services AT command API, I seem to remember it's possible to send both AT+BLEHIDCONTROLKEY and AT+BLEKEYBOARDCODE in the same "session" (so to speak). And, a typical Bluetooth keyboard with media keys can obviously do both media controls and keyboard presses simultaneously.
I want to be able to send:
0xb8 is the "Show Keyboard / Eject" key, which should reveal the keyboard on iOS; if you connect even a one-button keyboard in iOS, it assumes you don't want the on-screen keyboard. I don't know of a way to tell iOS that it's a limited "auxiliary" keyboard, so without that, offering the Eject key is a workaround.
I assume this is part of the HID report definition -- writing a comprehensive definition encompassing both -- but it's a bit beyond me. I'm wondering if @Gordon might know how to create a unified report definition capable of both, having written the two existing HID modules.
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)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem