F13-F24 HID keys

Posted on
  • Has anyone gotten F13-F24 keys to be sent from a Puck? I've tried to send them as HID commands using their numerical ID but applications that can/should recognize them don't for some reason.

    I can confirm the application can recognize F keys beyond 12 by using AutoHotKey to send the key.

  • It might be related to the 'HID report'? The array at the top of http://www.espruino.com/modules/ble_hid_­keyboard.js

    If you could find the HID report for a keyboard that has those extra keys then we could use that (or at least see how it differs from the one we currently send)...

  • Hm. The PDF included in the HID library saya F13+ are included in the 0x07 page, which is the same page already included for basic keys. I'll see if I can find more info the HID report descriptor.

  • Sorry for the double post but found someone encountering a similar issue with another kind of custom HID, the same fix may apply here. I'll see if I can test by making the change locally and importing that

    https://www.microchip.com/forums/m/tm.as­px?m=917121&p=1

  • Great! That sounds a lot like it'd be the issue. You could just copy the contents of http://www.espruino.com/modules/ble_hid_­keyboard.js into the IDE for now to test with.

    edit: This bit is I think the one that wants changing: https://github.com/espruino/EspruinoDocs­/blob/master/modules/ble_hid_keyboard.js­#L38-L45

  • Looks like that works. Changed lines 41 and 44 to 0x73 and I was able to send F13 as a key.

  • Great - thanks for checking it out! I've just made the changes so next time I update the main site it'll go live

  • Do you think it'd make sense to throw F13-F24 into the KEY array? Just so people know they have the option. I've found them to be a great alternative to using keys that may conflict with other applications. Most keyboards don't have F13+ keys anyways.

  • I was wondering about that - the problem is that adds a reasonable amount more memory usage for everyone using the HID keyboard class. I guess F13-24 all have adjacent numbers? If so maybe we could just add F13 as a key and then a comment in the file? Writing F13+1 isn't too painful?

    Although having said that there's loads of stuff in there already - a bit more wouldn't make much difference!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

F13-F24 HID keys

Posted by Avatar for tako @tako

Actions