You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a really weird problem, I don't know if it is my code or it is a bug. When I use DigiKeyboard.sendKeyStroke or DigiKeyboard.print it always prints the output a second time after a second or two. Also when I upload the code onto the digispark, disconnect it, and connect it again it just randomly prints the output.
An example: (I am trying to open Spotify using macropad) DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT); DigiKeyboard.delay(1000); DigiKeyboard.print("spotify"); DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(KEY_ENTER);
It prints "spotify" twice, and also when I plug in the digispark. It is so random.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
DigiKeyboard.sendKeyStroke() function is used for pressing keys on the keyboard.
DigiKeyboard.print() function is used to write what you want.
Check macropad key programming if it has some issues, because the sketch you provided is for windows keyboard.
To open Spotify, the sketch should like -
#include<DigiKeyboard.h>
void setup()
{
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(0,MOD_GUI_LEFT); //This keystroke is for press windows key only
DigiKeyboard.delay(1000);
DigiKeyboard.print("spotify");
DigiKeyboard.delay(1000);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}
void loop()
{
//Nothing to run here
}
Hi, I have a really weird problem, I don't know if it is my code or it is a bug. When I use
DigiKeyboard.sendKeyStroke
orDigiKeyboard.print
it always prints the output a second time after a second or two. Also when I upload the code onto the digispark, disconnect it, and connect it again it just randomly prints the output.An example: (I am trying to open Spotify using macropad)
DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT); DigiKeyboard.delay(1000); DigiKeyboard.print("spotify"); DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(KEY_ENTER);
It prints "spotify" twice, and also when I plug in the digispark. It is so random.
Thanks in advance.
The text was updated successfully, but these errors were encountered: