open-dribble-file

open-dribble-file is an interactive built-in function in `C source code'.


(open-dribble-file FILE)

Start writing all keyboard characters to a dribble file called FILE.
If FILE is nil, close any open dribble file.
The file will be closed when Emacs exits.

Be aware that this records ALL characters you type!
This may include sensitive information such as passwords.