Linux kernel module that allows you to set events on pressed keys
It includes some sample scripts that can be used as the command to be executed on every key pressed, these scripts are:
Registers every pressed key in a file.
If framebuffer is enabled it allows to do a console screenshot using print screen key.
Plays a sound on every key pressed, sample sounds included imitate a typewriter.
The tarball includes more instructions and examples.