• Hi,
    im trying to send keyinputs using a PuckJS ( 2v19 (c) 2021 G.Williams).

    var kb = require("ble_hid_keyboard");
    NRF.setServices(undefined, { hid : kb.report });
    function btnPressed() {
      kb.tap(kb.KEY.A, kb.MODIFY.LEFT_GUI, kb.MODIFY.LEFT_ALT);
    setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50})­;

    However, it throws this error, on every puck button press:

    BLE Connected, queueing BLE restart for later
    Uncaught Error: ERR 0x3401 (:3272)
    at line 1 col 104
    in function "tap" called from line 7 col 56
    kb.tap(kb.KEY.A, kb.MODIFY.LEFT_GUI, kb.MODIFY.LEFT_ALT);
    in function called from system

    Any ideas? Im using basically the same code as from the example and other forum threads e.g https://forum.espruino.com/conversations­/371473/#comment16333536

    No idea why its not working.


Avatar for l00hn @l00hn started