Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. /**
  2. * Made with Duckuino, an open-source project.
  3. * Check the license at 'https://github.com/Nurrl/Duckuino/blob/master/LICENSE'
  4. */
  5.  
  6. #include "Keyboard.h"
  7.  
  8. void typeKey(uint8_t key)
  9. {
  10. Keyboard.press(key);
  11. delay(50);
  12. Keyboard.release(key);
  13. }
  14.  
  15. /* Init function */
  16. void setup()
  17. {
  18. // Begining the Keyboard stream
  19. Keyboard.begin();
  20.  
  21. // Wait 500ms
  22. delay(500);
  23.  
  24. delay(3000);
  25. Keyboard.press(KEY_LEFT_CTRL);
  26. Keyboard.press(KEY_ESC);
  27. Keyboard.press("r");
  28. Keyboard.releaseAll();
  29.  
  30. delay(100);
  31. Keyboard.print(F("iexplore http://s3.amazonaws.com/rapgenius/hotdog.jpg"));
  32.  
  33. typeKey(KEY_RETURN);
  34.  
  35. delay(2000);
  36. Keyboard.press(KEY_LEFT_ALT);
  37. Keyboard.press("f");
  38. Keyboard.releaseAll();
  39.  
  40. delay(100);
  41. Keyboard.print(F("a"));
  42.  
  43. delay(100);
  44. Keyboard.print(F("%USERPROFILE%\\hotdog.jpg"));
  45.  
  46. delay(100);
  47. typeKey(KEY_RETURN);
  48.  
  49. delay(100);
  50. Keyboard.press(KEY_LEFT_CTRL);
  51. Keyboard.press("w");
  52. Keyboard.releaseAll();
  53.  
  54. delay(100);
  55. Keyboard.press(KEY_LEFT_CTRL);
  56. Keyboard.press(KEY_ESC);
  57. Keyboard.releaseAll();
  58.  
  59. delay(100);
  60. Keyboard.print(F("paint"));
  61.  
  62. delay(100);
  63. typeKey(KEY_RETURN);
  64.  
  65. delay(500);
  66. Keyboard.press(KEY_LEFT_CTRL);
  67. Keyboard.press("o");
  68. Keyboard.releaseAll();
  69.  
  70. delay(100);
  71. Keyboard.print(F("%USERPROFILE%\\hotdog.jpg"));
  72.  
  73. typeKey(KEY_RETURN);
  74.  
  75. delay(300);
  76. Keyboard.press(KEY_LEFT_ALT);
  77. Keyboard.press("f");
  78. Keyboard.releaseAll();
  79.  
  80. delay(100);
  81. Keyboard.print(F("k"));
  82.  
  83. delay(100);
  84. Keyboard.print(F("f"));
  85.  
  86. delay(300);
  87. Keyboard.press(KEY_LEFT_ALT);
  88. Keyboard.press("f");
  89. Keyboard.releaseAll();
  90.  
  91. delay(100);
  92. Keyboard.print(F("x"));
  93.  
  94. // Ending stream
  95. Keyboard.end();
  96. }
  97.  
  98. /* Unused endless loop */
  99. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement