There are various commercial hardware keyloggers from KeeLog (feel free to check their page) but they are releasing their older but still fully functional PS/2 keylogger design as a open source. There is source code for microcontroller too! Check it!

More...
3dd0c084-50ae-4e6d-97d1-1b2d49154180|3|4.0