4x4 keypad output to PC

Very new to programming Arduinos

I have a basic 4x4 keypad working with serial monitor.

I want my keypad to output to a PC and work in parallel with a keyboard. I am not finding the right example code to use.

What I currently have:

#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{‘1’,‘2’,‘3’,‘A’},
{‘4’,‘5’,‘6’,‘B’},
{‘7’,‘8’,‘9’,‘C’},
{’*’,‘0’,’#’,‘D’}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup(){
Serial.begin(9600);
}

void loop(){
char customKey = customKeypad.getKey();

if (customKey){
Serial.println(customKey);
}
}

So, correct me if I am wrong. I am using the nano and based on what I am reading the Nano cannot print. I guess I cannot load keyboard.h on a nano?

The Nano can print.
It can’t use Keyboard.h.
The compiler will tell you that.

This isn’t an installation and troubleshooting issue

@dougn0782

Your topic was Moved to it’s current location / section as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

it is not clear to me what you want to achieve.

Do you want that the keypresses on the 4x4 keypad are handled on the PC exact the same way as a keypress on your main USB-keyboard?

Or do you want to receive the 4x4-keypad-keypresses over serial interface into a serial-software running on the pc?

For the first you need an arduino with build-in USB-capabilities. A simple USB-virtual-comport like CP2102 or CH340 can't do that. The CP2102 / CH340 are additional chips

The microcontroller itself has to have USB-capabbilities to make him send real "USB-signals" to your PC.

best regards Stefan