Ide is not recognizing the keyboard library

I am trying to make a button box keyboard with an Arduino Nano, but IDE seems to be unable to recognize the commands for the library. It doesn't generate and error for the "#include <Keyboard.h>", only for the attempts to use functions from the library. The file location is set correctly in preferences and the library is downloaded, I have tried redownloading it by several methods, nothing has worked. please help.

Error code:

F:\4 - Projects\DEWYED\PE Electronics\PE 100 Arduino\PE 110 Sketches\PE 111 Keyboard\sketch_jul10a\sketch_jul10a.ino: In function 'void setup()':
F:\4 - Projects\DEWYED\PE Electronics\PE 100 Arduino\PE 110 Sketches\PE 111 Keyboard\sketch_jul10a\sketch_jul10a.ino:16:1: error: 'Keyboard' was not declared in this scope
 Keyboard.begin();
 ^~
F:\4 - Projects\DEWYED\PE Electronics\PE 100 Arduino\PE 110 Sketches\PE 111 Keyboard\sketch_jul10a\sketch_jul10a.ino: In function 'void loop()':
F:\4 - Projects\DEWYED\PE Electronics\PE 100 Arduino\PE 110 Sketches\PE 111 Keyboard\sketch_jul10a\sketch_jul10a.ino:24:5: error: 'Keyboard' was not declared in this scope
     Keyboard.write('A');                            //Sending the "A" character
     ^~
exit status 1

Compilation error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h

My code:

#include <Keyboard.h>

int pinA = 2;                                       //Declaring variables for the pins
int pinB = 3;
int pinC = 4;
int pinD = 5;
int pinE = 6;

void setup() {

pinMode(pinA, INPUT_PULLUP);                        //Setting up the internal pull-ups resistors
pinMode(pinB, INPUT_PULLUP);                        //and also setting the pins to inputs.
pinMode(pinC, INPUT_PULLUP);
pinMode(pinD, INPUT_PULLUP);
pinMode(pinE, INPUT_PULLUP);
Keyboard.begin();

}

void loop() {

  if (digitalRead(pinA) == LOW)                     //Checking if the first switch has been pressed
  {
    Keyboard.write('A');                            //Sending the "A" character
    delay(500);
  }

}

If this is in the wrong category let me know.

From the Keyboard library reference page

Compatible Hardware

HID is supported on the following boards:

Board Supported Pins
Leonardo All digital & analog pins >
Micro All digital & analog pins
Due All digital & analog pins
Zero All digital & analog pins
UNO R4 Minima All digital & analog pins
UNO R4 WiFi All digital & analog pins
GIGA R1 WiFi All digital & analog pins
Nano ESP32 All digital & analog pins
MKR Family All digital & analog pins

The Nano is not on the list. It will not work with the Keyboard library.

USB OTG Host and device also work on the ESP32-S3

some ESP32-S3 modules have a second USB connector for connecting USB OTG devices, e.g. ESP32-S3-DevKitC-1 v1.1