void setup(){ Serial.begin(9600); randomSeed(analogRead(0)); pinMode(0, INPUT_PULLUP); delay(5000); } void loop(){ if (digitalRead(0) == LOW) { // press and hold CTRL Keyboard.set_modifier(MODIFIERKEY_CTRL); Keyboard.send_now(); // press F12, while CLTR still held Keyboard.set_key1(KEY_F12); Keyboard.send_now(); // release all the keys at the same instant Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(500); } }