Java global keypress?

JIntellitype (which is an Apache 2.0 license) will do this for you in Windows. JxGrabKey appears to be a valid solution for Linux. I'm not aware of a cross-platform solution.

(These still use JNI, but they'll abstract the details for you).

Up vote 1 down vote favorite 1 share g+ share fb share tw.

For my program I need to register key events that happen without the application having the focus. (i.e. Internet explorer having the focus) I have been looking and people say you can do it with jni; however, is there anyway to do it without it?

Can someone give me a link of a really good jni example? The ones I have looked at so far havent been very helpful java keypress link|improve this question edited Apr 1 '11 at 19:53skaffman114k8136227 asked Apr 1 '11 at 19:26mimis40212.

JIntellitype (which is an Apache 2.0 license) will do this for you in Windows. JxGrabKey appears to be a valid solution for Linux. I'm not aware of a cross-platform solution.

(These still use JNI, but they'll abstract the details for you) melloware.com/products/jintellitype/inde... sourceforge.net/projects/jxgrabkey.

No, it is not possible without JNI or using some library which wraps the JNI away for you. The only way in Java to do things outside of your own Frames/Windows is using java.awt. Robot, but this only allows screenshots and sending input to other programs, not capturing input.

No im not making a keylogger, I am making an auto clicking program where whenever I press the F7 key, the computer stores the mouse cooardinates to be user later with the robot class. I looked at some jni examples but I didn't find any really helpful ones. Could you maybe point me in the right direction?

– mimis40 Apr 1 '11 at 19:36 I've never really done JNI, as then the program inherently gets system dependent. So I can't really help you here, sorry. – Pa?

Lo Ebermann Apr 1 '11 at 19:42 Alright thanks for at least looking at my thread – mimis40 Apr 1 '11 at 19:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions