• I would be interested in looking into code for that if its open.

    Well the code is very basic. It implements UP, DOWN, RIGHT, LEFT, BACKSPACE and ENTER keys.
    At each key event, the key buffer keys[]is updated and sent to the host (in my case an android phone running a gameboy emulator). It works well even if I noticed a small delay between the key press and the actual response in the game. I don't know if it comes from the BLE or the emulator.

    var kb=require("ble_hid_keyboard");
    
    BTN_UP=D3;
    BTN_DN=D24;
    BTN_LEFT=D2;
    BTN_RIGHT=D22;
    BTN_SEL=D4;
    BTN_START=D5;
    BTN_B=D28;
    BTN_A=D25;
    var keys=[0,0,0,0,0,0,0,0];
    
    function onInit(){
      NRF.setServices(undefined, { hid : kb.report });
    
      setWatch("keys[2]=kb.KEY.UP;NRF.sendHIDR­eport(keys);", BTN_UP, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[2]=0;NRF.sendHIDReport(ke­ys);", BTN_UP, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[3]=kb.KEY.DOWN;NRF.sendHI­DReport(keys);", BTN_DN, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[3]=0;NRF.sendHIDReport(ke­ys);", BTN_DN, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[4]=kb.KEY.LEFT;NRF.sendHI­DReport(keys);", BTN_LEFT, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[4]=0;NRF.sendHIDReport(ke­ys);", BTN_LEFT, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[5]=kb.KEY.RIGHT;NRF.sendH­IDReport(keys);", BTN_RIGHT, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[5]=0;NRF.sendHIDReport(ke­ys);", BTN_RIGHT, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[6]=kb.KEY.BACKSPACE;NRF.s­endHIDReport(keys);", BTN_B, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[6]=0;NRF.sendHIDReport(ke­ys);", BTN_B, {edge:"rising",repeat:true,debounce:50})­;
    
      setWatch("keys[7]=kb.KEY.ENTER;NRF.sendH­IDReport(keys);", BTN_A, {edge:"falling",repeat:true,debounce:50}­);
      setWatch("keys[7]=0;NRF.sendHIDReport(ke­ys);", BTN_A, {edge:"rising",repeat:true,debounce:50})­;
    }
    
About