Skip to content

Instantly share code, notes, and snippets.

@xtrcode
Created May 12, 2019 16:54
Show Gist options
  • Save xtrcode/965366c283618c53b9700a9692273698 to your computer and use it in GitHub Desktop.
Save xtrcode/965366c283618c53b9700a9692273698 to your computer and use it in GitHub Desktop.
DigiSpark ATtiny85 Example payload for the german keyboard layout to automatically open a terminal (i3wm) and visit a website.
//This the important part, include the De suffixed version instead of the normal one and the rest goes same as the original lib.
// see: https://github.com/adnan-alhomssi/DigistumpArduinoDe
#include "DigiKeyboardDe.h"
int LOOP = 0;
char *payload = "xdg-open https://www.youtube.com/watch?v=dQw4w9WgXcQ & exit";
void setup() {
DigiKeyboard.delay(2000);
}
void loop() {
if(LOOP == 0) {
LOOP = LOOP + 1;
// this is generally not necessary but with some older systems it seems to
// prevent missing the first character after a delay:
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(50);
DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_ALT_LEFT);
DigiKeyboard.delay(250);
DigiKeyboardDe.println(payload);
}
DigiKeyboard.delay(500000);
}
@PostboxRetinal
Copy link

welp, i've been rickrolled, nice one LMAO

@xtrcode
Copy link
Author

xtrcode commented Apr 1, 2022

welp, i've been rickrolled, nice one LMAO

Haha finally 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment