Send keyboard keycode 219

Posted on
  • Hi, I'm working on a project and was wondering how i could send bluetooth keycode 219,
    I haven't been able to replicate this info using the Puck.js- I attempted to use the default HID report provided in the tutorial and then using the low-level to try send 219.

      controls = require("ble_hid_controls");
      NRF.setServices(undefined, { hid : });
      NRF.sendHIDReport([0,0,219,0,0,0,0,0], ()=>{ 
        NRF.sendHIDReport([0,0,0,0,0,0,0,0], ()=>{}); // reset

    Suggestions much appreciated !

  • I've done some more research and according to various websites, 219 could also be either Windows key, square open bracket ("[") or curly open bracket ("{").

    Neither of these seems to be included in the ble_hid_keyboard / ble_hid_controls.
    I'm sure I'd have to create my own report but have no idea about that stuff. I would ideally use ble_hid_controls because it contains already controls for vol, etc.

  • Hi,

    I think you'd definitely need to use ble_hid_keyboard and not ble_hid_controls, but otherwise what you're doing seems ok (although .tap should still work for you).

    I think the problem you might be hitting is the HID report specifies a maximum value of 115:­keyboard.js

    0x25, 0x73,       // Logical Maximum (115 - include F13, etc)
    0x29, 0x73,       // Usage Maximum (115 - include F13, etc)

    You could try using your own HID report based on that one, but with just those numbers made bigger?

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

Send keyboard keycode 219

Posted by Avatar for Deas @Deas