Problem whit using Keyboard library

Im trying to make a smal macro keybord but it says that i don't have the #include <Keyboard.h>

As your topic does not relate directly to the installation or operation of the IDE it has been moved to the Programming Questions category of the forum

What is "it" ?

If it is a sketch then please post it here, using code tags when you do

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Which Arduino board are you using ?
Not all boards can act as a keyboard

do the arduino uno r3 work?

No

See Keyboard - Arduino Reference

Ok thanks

if you want an UNO to perform as a keyboard you could explore an alternative boot loader

see GitHub - NicoHood/HoodLoader2: 16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE

HoodLoader2 is a CDC BootLoader with self reprogramming and Fast USB-Serial function.

An Arduino Uno/Mega board has two Microcontroller of which one(16u2) is normally used for USB-Serial translation. But we can also use it as standalone AVR Microcontroller with (or without) USB functions as well.

HoodLoader2 gives you the option to reprogram the 16u2 of a normal Arduino Uno/Mega R3 with custom sketches. This means you can use the 16u2 as a normal USB AVR like a Leonardo. You have a full compatible USB-HID core, CDC Serial and you can also use the 7 i/o pins of the 16u2. The extended HID devices of the HID Project also apply for the HoodLoader2.

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