Are you me?
I did the very same thing ~20 years ago. I used a DOS Terminate and Stay Resident (TSR) code to achieve this, I did't have to fake any screen. The key strokes were stored in a file.
I still remember keyboard interrupt value (0x9) while registering TSR code.