How can i hook into the Keyboard event handler? I would like to make a dll, that can hook into the keyboard event chain, and be able to log any keystrokes. This isnt for anything malicious, im writing a chat application and this will be used for the archiving services. In most languages, you have to use a timed loop, or some sort of recursion, which is a bitch because it clearly eats system resouces. If i can key into the keyboard event handler, however, i can skip any sort of loop, and make the hook site "dormit" until a key is pressed, in which case my application will do SOMETHING with it, such as save it to a text file or something of that nature. Thanx in advance for anyhelp, Cheers!
Posted on 2003-09-15 01:32:45 by Snoopy2K
if its for a chat window, then why not record the text entered in the chat window itself by subclassing it... and if its your own chat program, then you will know the text contents as you'll have to send/recieve it on the network anyway
Posted on 2003-09-15 01:43:17 by evlncrn8
I understand your response, and truthfully, i need it to be global. I simply need to record ALL ketstrokes from program launch to program end.
Posted on 2003-09-15 02:22:13 by Snoopy2K
If you want it that way, then write a driver for it. And log down every keystroke.
Posted on 2003-09-15 05:37:20 by roticv
Captain hook is useful :), haldle WM_CHAR it is not hard to do.

MouseExample is in Iczelion's24tutorial ,keyborad hook is similar to mouse.
Posted on 2003-09-15 06:12:59 by etn
Posted on 2003-09-15 17:30:25 by QvasiModo
Great, thank you very much this is what i was looking for. Your DLL is a skeleton, so i am going to have to do a lot of tuning up to fit my specs, but this is a perfect start. Thank you very much.
Posted on 2003-09-15 21:46:17 by Snoopy2K