...\sketch_dec8a.ino:14:3: error: 'Keyboard' was not declared in this scope
Keyboard.begin()
^~~~~~~~
Multiple libraries were found for "Keyboard.h"
Used: ...\Arduino\libraries\Keyboard
Not used: ...\Arduino15\libraries\Keyboard
exit status 1
Compilation error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
What do I do? I'm using a Arduino Mega 2560, so could that be an issue?
Thanks!
Hint: whenever you get some new hardware, the very best place to start is to make sure that one or more of the library examples compiles and runs as expected.
The keyboard functions enable ...
the 32u4 and SAMD based boards (Leonardo, Esplora, Zero, Due and MKR Family) to appear as a native Mouse and/or Keyboard to a connected computer.
which implies that Keyboard library doesn't work with Arduino Mega 2560 board or the Arduino Uno boards.
What do I do?
Perhaps you could try using a 32u4 or SAMD board.
You would still get that same error message, but then it would be fixable like so: