Arduino UNO as keyboard

You can do that with an UNO but it's a lot easier with a Leonardo.

With the UNO you have to get an ICSP programmer to change the firmware of the USB "co-processor" on the UNO (ATmega16U2) so that it acts as a HID (Human Interface Device) endpoint. The problem is, that from then you cannot use the serial interface for debugging because the serial stuff is interpreted as key presses which then are sent to the connected PC as keyboard events.

Because the Leonardo has the USB interface directly in the main processor it's much easier to have both, a serial device and a HID endpoint.