Firmware Update

I want to update firmware of atmega 16u2 and want to use arduino uno as a usb keyboard and i cant get it how to do can anyone help