Error on code Please help

Using arduino nano, with the code below it comes up with this error message: exit status 1
‘Keyboard’ not found. Does your sketch include the line ‘#include <Keyboard.h>’? >:( >:( IT’S VERY ANNOYING!!!

#include <Keyboard.h>

void setup() {
  Keyboard.begin();
}

void loop() {
  }
  delay(1000);
  Keyboard.press('n');
  delay(100);
  Keyboard.releaseAll();
  delay(1000);
}

As clearly stated in their documentation. The Keyboard and Mouse libraries are only compatible with the native serial Arduino boards like the Leonardo, Micro, MKR, Zero and Due boards. You can't use these libraries with your Nano.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html .

https://www.arduino.cc/reference/en/language/functions/usb/keyboard/

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.

I think this means the library will not work with a NANO.

Tom.... :)

Can i use a pro mini?

No. The Pro Mini uses the same ATmega328P microcontroller as your Nano. The ATmega238P does not have native USB capabilities. The most similar board that will work with the Keyboard library is the Arduino Micro or the Pro Micro.