I cannot compile my scripts

I used this script


#include <Keyboard.h>

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

// Waiting 500ms for init
delay(500);

Keyboard.press(KEY_RETURN);

}

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

// Unused
void loop() {}

after I compiled it, the Arduino run the code but never stop to type the return key (i forgot to use Keyboard.releaseAll() )

when I try to compile other scripts this error message appear

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Disconnect Arduino.
2)
Reboot PC.
3)
Start IDE and load an innocent sketch (e.g. blink).
4)
Keep Arduino in reset (e.g. keep reset button pressed) and connect it to PC.
5)
Start sketch upload; still keep Arduino in reset.
6)
When IDE reports memory usage, release the reset.

The above should do the trick to get your Arduino in a 'working' state again.

I strongly suggest to implement a safe guard that allows you to disable sending keys to the PC; it would have removed the need to keep the Arduino in reset.