In this archive are four files:

  RECORD.COM -- Executable that records keystrokes (128 chars), but when the
    buffer is full it starts filling up the beginning of the buffer again.
  FIRSTREC.COM  -- Executable that records keystrokes (128 chars), but when
    the buffer is full it stops recording.
  RECORD.ASM -- Source for both RECORD.COM and FIRSTREC.COM
  RECORD.TXT -- This file

Basically, to use this program, just load it in memory before the keys you
want to be recorded will be typed (I use a batch file myself).  Then, when
you want to see the recorded keystrokes (remember, these are scan-codes and
include both the code for a key-press and key-release), just press the
Alt-Left Shift-g combination and the numbers will appear on the screen.

Note: The characters appear wherever the cursor is and continue to print
until the end of the buffer.  There is no error-checking for the end of the
video memory (the program uses direct memory writes) so if the cursor is
located near the bottom of the screen, the characters do not scroll back up
to the top of the screen but instead get essentially lost.

Disclaimer: This is the common, "I'm not responsible for what happens to you
or your computer due to this program" deal.
