A library of C++ classes for flexible logging to files (rolling), syslog, IDSA and other destinations. It is modeled after the Log for Java library (http://www.log4j.org), staying as close to their API as is reasonable. Home: https://log4cpp.sourceforge.net
Platforms: Linux, Windows, MacOS. New: CMake, CTest support for MS VS 2022, RAD Studio 12
...You can lookup the keycodes in /usr/include/linux/input-event-codes.h.
The keypress logs are recorded in debugfs as long as the module is loaded. Only root or sudoers can read the log. The module name has been camouflaged to blend-in with other kernel modules.
You can, however, execute a script at shutdown or reboot (the procedure would be distro-specific) to save the keys to a file.
LinuxID is an easy console-service for distro identification and more!
LinuxID is capable of identifying your distro, getting what it's based on and every detail related to it. So it could print "Linux Mint 16 Petra", and then all its details and its base OS: "Ubuntu 13.10, Saucy Salamander", and various other info. It is open-source and written in C++. Source code is commented and can be found in the "Files" tab. To run the program, download "LinuxID" file and run it accordingly: navigate to where you downloaded the file and type this:
....