dcsimg
Can i write a global keyboard hooker?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mahesh_Perumal
Posted On:   Wednesday, May 7, 2003 07:20 AM

I have written an application in VC++. It maps every keystrokes of the user to a table to simulate another key stroke. Lets assume, while it is running, if the user presses k, he receives m in the active window.




Is it possible to write such a program in Java? Can i register myself as a KeyboardProc and get notified whenever a key is pressed?



Thanx in advance,
Mahesh

Re: Can i write a global keyboard hooker?

Posted By:   Brian_Glodde  
Posted On:   Wednesday, May 7, 2003 09:49 AM

If you're going to write an app with similar capabilities, see this example:

Keyboard Handling


Source code here:

Keyboard Handling Source

Re: Can i write a global keyboard hooker?

Posted By:   Simon_Ablett  
Posted On:   Wednesday, May 7, 2003 07:26 AM

You would need to use JNI to interface with the operating system and intercept the individual keystrokes.

Regards.
About | Sitemap | Contact