*
The moose likes Java in General and the fly likes Trap a KeyStroke Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Trap a KeyStroke" Watch "Trap a KeyStroke" New topic
Author

Trap a KeyStroke

Thanh Le Quoc
Greenhorn

Joined: Jul 11, 2003
Posts: 2
Hi all !
How I can trap a KeyStroke although my program is not active (any other windows is activing)!.
Thanks to you !
tKC_07 <_!!!_> A believer of java
[ July 12, 2003: Message edited by: Thanh Le Quoc ]
Arvind Varma
Ranch Hand

Joined: Dec 24, 2002
Posts: 48
can you be more specific with what do u mean by not active?
Thanh Le Quoc
Greenhorn

Joined: Jul 11, 2003
Posts: 2
"My program is not active", it mean any other windows is activing !.
[ July 12, 2003: Message edited by: Thanh Le Quoc ]
Tom Angioletti
Greenhorn

Joined: Jun 25, 2001
Posts: 10
If you mean that the process running your JVM does not currently have focus, then I don't think you can. I've tried to find an answer to a similar question, and I think the OS never sends those events to your Java program. I'd be very interested to see if anyone knows a way to do this.
 
 
subject: Trap a KeyStroke
 
Similar Threads
Forum improvements
Delay while I type characters in the text box
the joy of being a guy ...
Operator and Assignment Mock Question
On bench