-
How can a Windows Keyboard Hook Be Implemented with Java?
Hi Everybody,
In Windows operating system, a hook is a mechanism by which a function can intercept events (messages, mouse actions, keystrokes) before they reach an application. The function can act on events and, in some cases, modify or discard them.
In VC++ or VB, it can be implemented with SetWindowsHookEx( ), and CallNextHookEx( ). Ho can it be done with C#? Such as Detecting Caps / Num / Scroll Using a System-wide Keyboard Hook with Java (See http://vbnet.mvps.org/index.html?co...sageboxhook.htm as VB example).
Thanks,
-
You will have to use JNI and write the keyboard hook in C++
http://java.sun.com/docs/books/tutorial/native1.1/
-
... or you can use the ready solution, which is available in the WinPack library:
http://www.jniwrapper.com/winpack_features.jsp#hooks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks