Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Capturing keyboard events in active window

  Asked By: David    Date: Sep 21    Category: Java    Views: 1357

I'd like to know if its possible to make a program in java which
captures keyboard event even when this program is running on background.
For example I could run it when the computer starts up and It would
sstay on background loggin everything the user types. Is it posssible?



2 Answers Found

Answer #1    Answered By: Calvin Banks     Answered On: Sep 21

In java  you normally capture key events  by adding a key listener to a java
component. That would exclude all the stuff which other system windows
would be capturing.

Answer #2    Answered By: Ralph Murray     Answered On: Sep 21

Yeah I know thats the problem... keyboard  would be captured just when
that component is active... and if the whole java  application is not
active, It wont capture the keyboard events... and thats what I want...

Didn't find what you were looking for? Find more on Capturing keyboard events in active window Or get search suggestion and latest updates.