Dukweeno / Duckuino

Simple DuckyScript to Arduino C converter.
https://dukweeno.github.io/Duckuino/
MIT License
353 stars 117 forks source link

Escape key not working #18

Closed chubbybarbarian closed 7 years ago

chubbybarbarian commented 7 years ago

image

Here is my script:

/*
 * Generated with <3 by Dckuino.js, an open source project !
 */

#include "Keyboard.h"

void typeKey(int key)
{
  Keyboard.press(key);
  delay(50);
  Keyboard.release(key);
}

/* Init function */
void setup()
{
  // Begining the Keyboard stream
  Keyboard.begin();

  // Wait 500ms
  delay(500);

  delay(800);

  typeKey(KEY_LEFT_GUI);

  delay(40);

  Keyboard.print("Do not touch anything This is automatically setting up the USB");

  delay(2000);

  typeKey(KEY_LEFT_ESC);

  typeKey(KEY_LEFT_ESC);

  typeKey(KEY_LEFT_ESC);

  delay(200);

  typeKey(KEY_LEFT_GUI);

  delay(40);

  Keyboard.print("http://bit.ly/2m7vd8c");

  delay(20);

  typeKey(KEY_RETURN);

  delay(10);

  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press('w');
  Keyboard.releaseAll();

  delay(5);

  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press(KEY_LEFT_SHIFT);
  Keyboard.press(KEY_F3);
  Keyboard.releaseAll();

  // Ending stream
  Keyboard.end();
}

/* Unused endless loop */
void loop() {}
lowlevl commented 7 years ago

Done, thanks for the report @chubbybarbarian and thanks to @Plazmaz for the pull request :D

Plazmaz commented 7 years ago

no problem @Nurrl