How to record the key strokes pressed and save the same in a text file

Hi Guys,

I am working on a POC where I have to capture all the keystrokes/keys pressed on an application and save them somewhere to catch any misuse of the information. Though i have seen Key press trigger but not sure how will i capture the name of the key pressed and then add to string or something else.

Please share your ideas.