Arduino keyboard not working on Arduino Uno R3

The library clearly says that Arduino Uno R3 is compatible with it here:

But I have had the same problem people with non compatible boards have also had and that is the compiler giving this message:

'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
I have to mention that I am relatively new in the area of programming and usually use electronic components to resolve problems, but here it sadly cant be done :frowning:

Thanks for the help in advance

Allows an Arduino board with USB capabilities to act as a Keyboard.

That should read "with native USB capabilities".

The keyboard functions enable 32u4 or SAMD micro based boards to send keystrokes to an attached computer through their micro’s native USB port.

That library requires a processor with native USB like a Leonardo or Pro Micro. An Uno mega328 processor does not have native USB.

1 Like

you they are mistaken. Uno is not compatible.
The question comes up every week.

1 Like

That your Uno has a USB connector does not mean it's got the smarts to talk to a keyboard. That takes a different interface level, which only some Arduino products have. Unfortunately, this appears to be a grey area in the Arduino publicity, as this confusion is very common.

1 Like

Interestingly, the page he linked to lists the Uno. Then, says:

Compatibility Note

Note: while the library is supposed to compile correctly on these architectures, it might require specific hardware features that may be available only on some boards.

No freaking wonder there's confusion. Sigh.

1 Like

It's not really relevant what it will compile on, if it won't work on some of those. A list of boards that it will work on would make a lot more sense.

1 Like

No, @detergent is correct, it does clearly say Uno compatible. Wrongly. But quite clearly.

@detergent unfortunately, this being a community forum, none of us work for Arduino and can't correct that page.

2 Likes

Ok, I corrected my message :slight_smile:

2 Likes

If you go past that initial screen and read the actual documentation it seems pretty clear that Uno is not on the list.

Notes and Warnings

These core libraries allow 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.

1 Like

Sure, but why would you? This is supposed to be learner-friendly, not a lawyer's --- dream.

1 Like

I want to thank everybody who answered here, as I said im pretty new to the programming world and this is a lot of help.
Thanks again

Logged on github: Library reference pages may list incompatible boards in the compatibility list · Issue #11871 · arduino/Arduino · GitHub

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.