function btnPressed() {
// Send 'a'
kb.tap(kb.KEY.A, 0, function() {
// Followed by capital 'A'
kb.tap(kb.KEY.N, 0);
});
}
Sending the keypress takes time - it has to send 'keydown' followed by 'keyup'. It returns immediately and then calls the function in the third argument when finished. You can't just send multiple taps in commands one after the other
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.
Hi - you need to send multiple keys like is shown in the example you linked https://www.espruino.com/BLE+Keyboard
Sending the keypress takes time - it has to send 'keydown' followed by 'keyup'. It returns immediately and then calls the function in the third argument when finished. You can't just send multiple taps in commands one after the other