Avatar for tako

tako

Member since May 2018 • Last active Jun 2018
  • 2 conversations
  • 8 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    I think adding a delay parameter would be a great solution to this for the future.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    So... here's what I ended up doing (and it works, with no errors!)

            NRF.sendHIDReport([kb.MODIFY.GUI|kb.MODI­FY.SHIFT,0,kb.KEY.F11,0,0,0,0,0], function() {
              setTimeout(function() {
                NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() {
                  console.log("keys sent");
                });
              }, 550);
            });
    

    550 seems to be a good spot for a delay in "ending" the HID report. Different software pick up keyboard actions at different intervals, I guess, so this was good for my specific use case. If the delay is too long, it'll trigger it x many times.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    The first snippet is something I've already tried - doesn't work consistently. Like my prior attempts, it works "sometimes" - double clicking /usually/ does the proper thing, but not always.

    The second snippet has the same results.

    My "broken" snippet is the only one that works consistently. (but causes an error, funny enough - try/catching the error makes it break again).

    Here's some context for what exactly I'm doing:

    I'm setting up a recording kiosk room thing. I have Open Broadcaster Studio running with some obscure hotkey to Record/Stop that won't trigger anything else (it's now WIN+SHIFT+F11 ... WIN+F12 was the save function in PPT), as I need it to always run in the background.

    Puck.js is great because it can sit wirelessly on a lectern and do everything they need to do without having to touch the mouse/kb of the computer. I've programmed different actions for length of click, double click, clicks with no light, etc...

  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    So...this (despite causing an an error) "works" for my intended purposes. This is the only thing I've been able to do that makes it work "properly".

          NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KE­Y.F12,0,0,0,0,0], function() {
          });
          NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KE­Y.F12,0,0,0,0,0], function() {
            NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() {
              console.log("keys sent");
            });
          });
    

    Error:

    
    Uncaught Error: BLE HID already sending
     at line 138 col 8
          });
           ^
    in function "triggerCommand" called from line 96 col 88
    ...eld': held, 'light': light});
                                  ^
    in function called from system
    

    Have any suggestions on how to improve this so it's not technically broken? lol

  • Avatar for tako

    Windows 10, latest puck.js firmware as of yesterday.

    It seemed pretty reliable with the a/A examples. Assumingly, for a "press and hold", would I do something like:

          NRF.sendHIDReport([kb.MODIFY.GUI,0,0,0,0­,0,0,0], function() {
            NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KE­Y.F12,0,0,0,0,0], function() {
              NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() {
               console.log("keys sent");
              });
            });
          });
    
  • Avatar for tako

    I'm not sure what's going on - the code on the puck is executing fine, getting all my correct debug output and callbacks for kb.tap;

    however, the computer is not always detecting the taps properly. I have it currently sending like this:

          kb.tap(kb.KEY.F12, kb.MODIFY.GUI, function() {
           console.log("keys sent"); 
          });
    

    Intending to trigger Win+F12 - it does trigger the hotkey on the computer SOMETIMES. I have to press the button a lot to get it. If I do it myself on a keyboard, no problems - intended application catches the hot key. Not so much on the puck.

    Any ideas?

  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    Thanks. Will check it out when my puck arrives. (UPS keeps lying to me and getting my hopes up!)

    • 3 comments
    • 123 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for tako

    Hi, is there a known library for Windows (python or node) that will work with sending bluetooth messages back to Puck?

    I intend on having a Puck. paired as a HID so that a button press, triggers a hotkey (which executes a script on the computer) ...but I need a callback to alter the LED on Puck.

Actions