Forum Rule: Always post complete source code & details to reproduce any issue!
-
strange issue with "'Keyboard' was not declared in this scope" error.
A minimal Teensy 4 Sketch in the Arduino IDE consisting of using the function:
Keyboard.Print("Hello");
...yields an error message of
"....Multiple libraries were found for "Keyboard.h"...."
and
'Keyboard' was not declared in this scope
Changing the Arduino IDE menu "Tools/USB Type:" from "Serial" to "Keyboard"
cures the problem and results in a successful compile.
What exactly does setting this menu item do to the code compilation? The reason I ask is that I get the same errors when attempting a compile of the same code in platformio/vscode and I would like to resolve it there as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules