Digispark ATtiny 85 - not recognised as HID device I am trying to create auto-username-writer with Digispark ATtiny 85. I have a pretty simple sketch:

#include &lt;DigiKeyboard.h&gt;        
void setup() {
}
void loop() {
    DigiKeyboard.sendKeyStroke(0);
    DigiKeyboard.delay(100);
    DigiKeyboard.sendKeyStroke(76, MOD_ALT_RIGHT | MOD_CONTROL_LEFT); //ctrl+alt+del
    DigiKeyboard.delay(2000);
    DigiKeyboard.print("username");
    DigiKeyboard.sendKeyStroke(0x2B); //tab

    for (;;) {}
}


When I upload the code via Arduino IDE into the device (Board: Digispark (Default - 16.5MHz), it finishes successfully, it is recognised as a HID device and immediately performs all the tasks. But when I disconnect it and connect it again (to my PC or any other PC) it is recognised as Digispark Bootloader and does not do anything.

I have tried it in Arduino IDE 1.8.8 and in Arduino IDE 1.6.5 and I have no idea why it is only recognised right after upload. I have two ATtinys and both do the same behaviour.

Can someone help me, please?

EDIT:
I tried adding digitalWrite(1, HIGH); to detect, whether the sketch even runs and it turned out it does not even run (except after the upload)...
After five seconds, which is when the bootloader should switch to running your code, how does it show up in the list of usb devices (lsusb in Linux, Device Manager in Windows, etc.)

The original Digispark was a bit temperamental when plugged into USB 3 ports. If you are plugging it into one, try using a usb2 hub and plugging it into the hub instead. 

Also, did you get this from Digistump, or is it a knock-off?