Sign in to follow this  
cresty

Need some help...

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ^^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this