Keylogger
A "keylogger" is software designed to monitor keyboard strokes and relay these strokes to an attacker/user. While they are commonly used to steal data and sensitive information, they can also be used for research purposes.
Example of Keylogging:
Source: security-sleuth.com
Origin: 1970s
Source: MalwareBytes.com