Archived

This topic is now archived and is closed to further replies.

crazemanx

Keystroke monitroing in background

Recommended Posts

crazemanx    128
I would like my windows application to be able to run in the background and monitor any and all keystrokes while the user is running programs. I think I have seen programs that do this so it must be possible... any ideas how?

Share this post


Link to post
Share on other sites
To run in the background, if I understand you correctly, just don''t create a window. To moniter keystrokes, im not quite sure what you mean. If you want to see if a key is down use GetAsyncKeyState(). Ask a more specific question.

Share this post


Link to post
Share on other sites
krez    443
he''s talking about a keylogger...
sorry, i can''t help you with that, but maybe someone else will...
(btw, whose password are you trying to get?)

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
David_Kay    122
I feel knowledge should be shared. Depending on the programmer, it is up to him or her to use it for whatever reason they want. Will eventually find out anyways so might as well tell them.. To set up a logger, for mouse, keyboard or other input devices, look up the function SetWindowsHookEx in the MSDN library or on Microsofts developer site.

Share this post


Link to post
Share on other sites
crazemanx    128
Hehe actually I want to make a kind of global hotkey system, which can pick up certain key combinations and replace them with a particular string. So say i press ctrl-alt-n my program will pick that up and send my keystrokes typing my name to the application it was originally destined for. I realise this is a bit dodgy but i thought it would be an interesting programming challenge.

p.s. i like the idea of monitoring the mouse, maybe i could do a kind of Black and White style gesture inteface for windows (completely useless but hey!)

Share this post


Link to post
Share on other sites
Xorcist    122
I actually wrote a global scanhook (keylogger) for part of a practical joke once. I kept changing the windows background to this horrid picture and the app was completely hidden on win9x machines. I wrote the scanhook so that the app could be made visible after a certain killswitch phrase was entered, so it could then be turned off. I'm sure it'll work for what you need, all it does is process keystates and direct them to a linked application. If you want the keylogger I can dig it up. It was written in Delphi 5.0 though (So you might have to translate the source if you want a C/C++ version). I can write a quick sample around it so you can see how it works, but don't expect a complete writeup on how to program your own. Let me know.

Edited by - Xorcist on November 6, 2001 2:26:12 PM

Share this post


Link to post
Share on other sites