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,