issues with uploading sketch

The Keyboard library is not compatible with the Nano. It can only be used with boards that have native USB, such as Leonardo, Pro Micro, Micro, Zero, etc.