Great! That's really promising.
So the first code you posted (that looks good) doesn't work? You basically have to send [kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0] twice?
[kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0]
In that case, could you just do:
NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() { console.log("keys sent"); }); }); });
You could also try:
NRF.sendHIDReport([kb.MODIFY.GUI,0,0,0,0,0,0,0], function() { NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { NRF.sendHIDReport([kb.MODIFY.GUI,0,0,0,0,0,0,0], function() { NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() { console.log("keys sent"); }); }); }); });
so: press GUI, press F12, release F12, release GUI
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Great! That's really promising.
So the first code you posted (that looks good) doesn't work? You basically have to send
[kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0]
twice?In that case, could you just do:
You could also try:
so: press GUI, press F12, release F12, release GUI