For some time now i have a really annoying error. idk what happens but at some point my keyboard.h stops working completely. When compiling, I get the error message:
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\examples\09.USB\Keyboard\KeyboardMessage\KeyboardMessage.ino:23:0:
C:\Users\***\Documents\Arduino\libraries\Keyboard\src/Keyboard.h:29:2: warning: #warning "Using legacy HID core (non pluggable)" [-Wcpp]
#warning "Using legacy HID core (non pluggable)"
^~~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\examples\09.USB\Keyboard\KeyboardMessage\KeyboardMessage.ino: In function 'void setup()':
KeyboardMessage:33:3: error: 'Keyboard' nicht gefunden. Beinhaltet Ihr Sketch die Zeile '#include <Keyboard.h>'?
Keyboard.begin();
^~~~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\examples\09.USB\Keyboard\KeyboardMessage\KeyboardMessage.ino: In function 'void loop()':
KeyboardMessage:46:5: error: 'Keyboard' nicht gefunden. Beinhaltet Ihr Sketch die Zeile '#include <Keyboard.h>'?
Keyboard.print("You pressed the button ");
^~~~~~~~
Mehrere Bibliotheken wurden für "Keyboard.h" gefunden
Benutzt: C:\Users\***\Documents\Arduino\libraries\Keyboard
Nicht benutzt: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\Keyboard
exit status 1
'Keyboard' nicht gefunden. Beinhaltet Ihr Sketch die Zeile '#include <Keyboard.h>'?
Dieser Bericht wäre detaillierter, wenn die Option
"Ausführliche Ausgabe während der Kompilierung"
in Datei -> Voreinstellungen aktiviert wäre.
I tried reinstalling the Ide and even clearing every file and folder with arduino in the name I can access. I Think there is an error with a file in the “C:\Program Files\WindowsApps\” folder but as a admin user you cant access it, at least via the file explorer. You need a special “trusted installer” permission to even look at the files in this location. Kinda sus that you arent allowed to look at files on your own machine even as an admin but some program has full access to it.
I use the Microsoft store Version of the arduino ide and I tried with multiple compatible boards such as Leonardo, pro micro (32u4) and the Mega 2560. The code i used was the message code that came with the lib. I have a suspicion that OOSU10.exe is causing my issues at some point as it is a tool to manipulate windows in normally unsupported ways to get rid of windows spyware and annoying “features”. I will keep it for now with my current setting though. My next move will be to try to delete the arduino files in the “C:\Program Files\WindowsApps” location via cmd or power shell.
I hope someone has a clue or a solution for me as reinstalling windows isn´t a solution I want to be stuck with.