Mouse not found problem

I'm trying to make an Arduino Mega 2560 click the left button of the mouse and than press the enter key, but it continues to say that it can't find the mouse and the keyboard...

That's the error (ITALIAN):

Arduino:1.8.7 (Windows Store 1.8.15.0) (Windows 10), Scheda:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Megaport\Documents\Arduino\click\click.ino:1:0:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Mouse\src/Mouse.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]

#warning "Using legacy HID core (non pluggable)"

^

In file included from C:\Users\Megaport\Documents\Arduino\click\click.ino:2:0:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\libraries\Keyboard\src/Keyboard.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]

#warning "Using legacy HID core (non pluggable)"

^

C:\Users\Megaport\Documents\Arduino\click\click.ino: In function 'void setup()':

click:9:3: error: 'Mouse' non trovato. Il tuo sketch include la riga '#include <Mouse.h>'?
Mouse.begin();

^

click:11:3: error: 'Keyboard' non trovata. Il tuo sketch include la riga '#include <Keyboard.h>'?
Keyboard.begin();

^

C:\Users\Megaport\Documents\Arduino\click\click.ino: In function 'void loop()':

click:16:3: error: 'Mouse' non trovato. Il tuo sketch include la riga '#include <Mouse.h>'?
Mouse.click(MOUSE_LEFT);

^

click:16:15: error: 'MOUSE_LEFT' was not declared in this scope

Mouse.click(MOUSE_LEFT);

^

click:20:3: error: 'Keyboard' non trovata. Il tuo sketch include la riga '#include <Keyboard.h>'?
Keyboard.press(enter);

^

exit status 1
'Mouse' non trovato. Il tuo sketch include la riga '#include <Mouse.h>'?

Questo report potrebbe essere piĆ¹ ricco di informazioni abilitando l'opzione
"Mostra un output dettagliato durante la compilazione"
in "File -> Impostazioni"

click.ino (375 Bytes)

The Mouse and Keyboard libraries only work on 32u4 and SAMD based boards: Leonardo, Micro, Esplora, Zero, Due and MKR Family.