Hi all,
How can I send a keayboard key with modifier? I would like to send a CTRL MAJ key for example.
I work on the smart remote 3 project.
Thanks in advance,
Sylvain
Hi all,
How can I send a keayboard key with modifier? I would like to send a CTRL MAJ key for example.
I work on the smart remote 3 project.
Thanks in advance,
Sylvain
Hi Sylvain,
the HID Descriptor in the SR3 doesn't include modifier keys currently, due to the lack of modifier keys on the smart remote hardware itself. To add support for Ctrl, Shift, etc. the HID Descriptor needs to be updated, and additionally the function that assembles the Keyboard HID Report needs to be modified (modifier keys are normally put in a bitmask rather than a list like the other keys).
The attached patch file applies the mentioned modifications, with HID descriptor modifications taken from the nRF5 SDK HID Keyboard example. The '0' and '1' keys on the SR3 are used for testing purposes as Shift and Control keys. I tested it on windows 10, and it will hopefully work with your Host system also.
Note that the HID Descriptor in this patch adds supports for all modifiers from usage id 0xE0 to 0xE7, but I only added parsing of LeftControl (0xE0) and LeftShift (0xE1) keys in this example. See page 59 of the HID Usage table document for list of all usage ids: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
Best regards,
Audun
Hi Audun,
Thank you, using the patch I was able to do exactly what I wanted.
Best regards,
Sylvain
Hi Audun,
Thank you, using the patch I was able to do exactly what I wanted.
Best regards,
Sylvain