2 messages in net.java.dev.jna.usersRe: [jna-users] Re: [Fwd: Re: Global ...
FromSent OnAttachments
rzoNov 19, 2007 12:09 pm 
Timothy WallNov 19, 2007 12:59 pm 
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:Re: [jna-users] Re: [Fwd: Re: Global keyboard Listener using JNA]Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Nov 19, 2007 12:59:43 pm
List:net.java.dev.jna.users

On Nov 19, 2007, at 3:10 PM, rzo wrote:

Timothy,

Thanks for the clarification. I was not aware of this. What do you think is the best way for building a global key listener, using WH_KEYBOARD_LL or WH_KEYBOARD ? What is the advantage/disadvantage of each ?

The _LL version is *not* injected into other processes, which means the hook is called in the context of its own process. It's also *not* required to reside in a DLL (which makes a Java-provided hook easier). It can also hook system keys. Either can be installed locally or globally.

Most examples I found on the internet use WH_KEYBOARD.

Interesting. Most examples I found used the _LL version :)

Concerning the bug you have found with WH_KEYBOARD_LL. Have you already checked the changes into subversion ?

Yes. I intend to do an "official" 3.0 release as soon as I can get builds for a few of the other platforms that haven't yet been updated. The fix also fixes a crash using the NT service example in the contrib area.