Printable View
You have too use a dll
Use an API function to log the keyboard events, but only if the window you are logging has the focus.