How to listen a keyboard all the time?

My program must know, that some button is pushed. When some person play in some game, my program must run in background. When this person push button F1, my program must do something. How do this?
[203 byte] By [JavaCranea] at [2007-11-27 9:53:43]
# 1
I don't you can do it in Java unless you app is in focus. Maybe someone else knows of a way.
_helloWorld_a at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 2
> When this person push button F1, my program must do something. How do this?You do not use Java, you use a native language so you can do these incredibly platform specific things.
gimbal2a at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 3
> My program must know, that some button is pushed.> When some person play in some game, my program must> run in background. When this person push button F1,> my program must do something. How do this?What actually do you want it to do?
_helloWorld_a at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 4
It must shoot screen (I know, how do this).
JavaCranea at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 5
> It must shoot screen (I know, how do this).Elvis-fashion?~
yawmarka at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 6
> > It must shoot screen (I know, how do this).> > Elvis-fashion?> > ~what?
JavaCranea at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 7
> It must shoot screen (I know, how do this).Oh another online poker hand odd calculator. Just what the world needs...Anyway nobody cares what you want your program to do. It isn't relevent. JNI. That's relevent.
cotton.ma at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...
# 8

> > > It must shoot screen (I know, how do

> this).

> >

> > Elvis-fashion?

> >

> > ~

>

> what?

http://www.elvispresleynews.com/TheCarElvisShot.html

Note the picture on the bottom right.

~

yawmarka at 2007-7-13 0:23:03 > top of Java-index,Java Essentials,Java Programming...