Capture keystrokes

If I am working in an application and I press a key from the keyboard, how can I grab that key (or string) including the name of the original application using C #?

0


source to share


2 answers


You need to set up window bindings to call the callback function for any keyboard event. You can use SetWindowsHookEx to set window hooks.

Check out this MSDN blog post to learn more about it.



http://blogs.msdn.com/toub/archive/2006/05/03/589423.aspx

+2


source


There is a good example of a keylogger at codeproject.com . Hope this helps.



0


source







All Articles