PS/2 keyboard implementation for AVR ATtiny microcontrollers, with a example program reacting on piezo sensor
You can find a detailed walkthrough on the related hardware from my blog, see http://codeandlife.com/?p=1488
Code is released under GNU GPL v3. This is likely a good starting point if you'd like to implement a real keyboard with an AVR 8-bit MCU.
If you have any comments, drop me a line. :)