markjoe Posted May 14, 2009 Share Posted May 14, 2009 First of all, before people get all worked up: I realize this is the basic functionality of a keylogger, and no, that is NOT what I am trying to build. If I wanted a keylogger I would download one of the many available. In fact in searching for what I need, all I can find is keylogger programs... again, NOT what I want. On to my issue... I am writing a testing simulator/bot type app in Java and I need a way to pause it when it is not the active window. It doesn't seem to be possible from within the JVM and while this app will be cross platform supporting Mac, Windows and Linux I am ok with native calls for each OS if that's what it needs to be. All my testers (both, lol) are on Windows right now, so that is all I am currently concerned with. So does anybody know if there is a DLL that offers such functionality or can point me in the right direction (.NET class,Namespace, etc) to write my own DLL? Quote Link to comment https://forums.phpfreaks.com/topic/158176-solved-netcjava-capture-keystroke-not-a-keylogger/ Share on other sites More sharing options...
markjoe Posted May 15, 2009 Author Share Posted May 15, 2009 Found the answer elsewhere. NativeCall java library, IntCall("user32","GetAsyncKeyState") a little bit slow, but perfect for listening to a single key with a 1 second resolution. Quote Link to comment https://forums.phpfreaks.com/topic/158176-solved-netcjava-capture-keystroke-not-a-keylogger/#findComment-834825 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.