i'd like to create a KeyLogger that saves to a file, the keystrokes and the program/window changes, that a user does. i wanted to know if there's a better way to do this than using a timer and the GetAsyncKeyState API, i dont think the timer is efficient. Like is there something that u can do, like each time a Keyboard event happens.

THANKS