This sample saves all of the text entered into a session by a user to a log file. Only text entered by the user is saved.
These samples use events to capture and save data users enter during a terminal session.
As the user enters text, the BeforeSendKeys (IBM) or KeysSending (Open Systems) event adds the text entered to a buffer before each key is sent.
When the control key is pressed, the BeforeSendControlKey (IBM) or ControlKeysSending (Open Systems) events are handled to append the text in the buffer to a file. The buffer is cleared before the control key is sent.