a sort of KeyListener without a GUI Component?
a sort of KeyListener without a GUI Component? ( or any trick that will do)?
please be patient with my question
I can't express myself very well but it's very important.
Please help me I need an example how to implement
a way to detect some combination of keystrokes in java without
any GUI ( without AWT or Swing frames ...)
just the console (DOS or Linux shell window) or with a minimzed
java frame (awt or swing...) you know, MINIMIZED= not in focus.
in other words if the user press ctrl + alt +shift ...or some
other combination... ANYTIME ,and the java program is running in the
background, is there a way to detect that,
... my problem if I use a frame (AWT or SWING) the windows must
be in focus and NOT MINIMIZED..
if I use
someObject.addKeylistener(someComponent);
then the "someComponent" must be in focus, am I right?
What I'm coding is a program that if you highlight ANY text in
ANY OS window, a java window (frame) should pop up and match the
selected text in a dictionary file and brings me the meaning
( or a person's phone number , or
a book author ...etc.)
MY CHALLENGE IS WITHOUT PRESSING (Ctrl+C) to copy and paste
...etc. and WITHOUT MONITORING THE OS's CLIPBOARD ...I just want to
have the feature that the user simply highlight a text in ANY
window anywhere then press Ctrl+shift or some other combination,
then MY JAVA PROGRAM IS TRIGGERED and it should EMULATE SOME
KEYSTROKES OF Ctrl+C and then paste the clipboard
somewhere in my program...with all that AUTOMATION BEING in the background.
remember that my whole program ALL THE TIME MUST BE MINIMIZED AND
NOT IN FOCUS
or just running in the background (using javaw)..
is there any trick ? pleeeeeeze!!!
i'm not trying to write a sort of the spying so-called "key-logger"
purely in java but it's a very similar challenge.
please reply if you have questions
I you could please answer me , then guys this would be very
valuable technique that I need urgently. Thanks!

