Capturing Keyboard press on a Leonardo / ATmega32u4 board.

Maybe it's best to start with a firm grasp of the hardware: The PC keyboard