void loop() {
// put your main code here, to run repeatedly:
int estadoPulsador = digitalRead(3);
if (digitalRead(3) == 1) // if the SHIFT Button is pressed
{
Keyboard.press('Shift');
delay(100);
Keyboard.releaseAll();
// wait for new window to open:
delay(100);
}
}
Please use code tags when you post code or warning/error messages. To do this, click the </> button on the forum toolbar, then paste the text you want to be in the code tags. Finally, move the cursor out of the code tags before adding any additional text you don’t want to be in the code tags. If your browser doesn’t show the posting toolbar, then you can manually add the code tags like this: [code]``[color=blue]// your code is here[/color]``[/code]
The reason for doing this is that, without code tags, the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier for us to read your code and to copy it to the IDE or editor.
Using code tags and other important information is explained in the “How to use this forum” post. Please read it.