Need some help...

Started by
1 comment, last by cresty 16 years ago
So i wrote a program which keeps track of how many times the user have pressed each key and mousebutton and then saves the data to a file. Thought it would be interesting to see which key i press the most. Anyways how do i make it so that i can "catch" the events or whatever it's called when the window is not in focus? I have a hard time finding info about this becaue i dont' what this is called, catching events or something maybe? I would appreciate any help on this, thanks.
Advertisement
You are effectively writing a keylogger. I've never written such software, but my understanding is that the term you are looking for is a "system hook" or "keyboard hook". You should bear in mind that this kind of software is often frowned upon due to the privacy implications of a keylogger.

If your only interest is in which keys you press most often, there are many keyloggers already written that are available on the Internet.
I know there already are some keyloggers out there. Thought i would write my own for fun/learning.

I can't really prove that it's for personal puposes only but oh well.

Thanks for your help ^^

This topic is closed to new replies.

Advertisement