3 messages in net.java.dev.jna.users[Fwd: Re: Global keyboard Listener us...
FromSent OnAttachments
rzoNov 8, 2007 2:48 am 
Timothy WallNov 8, 2007 8:41 am 
Timothy WallNov 13, 2007 5:29 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Fwd: Re: Global keyboard Listener using JNA]Actions...
From:rzo (rz@gmx.de)
Date:Nov 8, 2007 2:48:56 am
List:net.java.dev.jna.users

Michele,

I have written a Hot Key listener. You may find it on:

https://jna.dev.java.net/nonav/issues/showattachment.cgi/11/contribution.zip

See the test.Test.testHotKey() for usage.

Please note that the windows Hot Key function is implemented in such a way, that once you set a listener on the key no other process/task may use this key. Therefore this is not useful as a general key listener. It is useful if you want your java application to listen to hot keys even if your applications window is currently not the active window.

I have also started implementing a general keyboard listener which inserts a keyboard hook. However this requires the listener method to be defined in a dll. Given that I do not have a C Development (this is the reason why I love jna) I did not continue with this. However this should not be too complicated to implement.

The java code for this is found in WindowsXPKeyboard.addListner(). However it is commented out.

Regards

- Ron

Michele Croci wrote:

Hi " rzorzorzo <http://sourceforge.net/users/rzorzorzo/>",

I was trying to implement a general keyboard listener using JNA. Unfortunately the JVM always crashes, no way to solve the problem. You say you have implemented an hotkey listener. I have looked at your code in sourceforge but I haven't found the desired functionality.

Can you help me? Do you really have written a general keyboard listener?

Thank you very much.

Best Regards,