Keyboard repeating

Is it possible to directly read the status of pressed keys without KeyEvents? Holding a button causes KeyEvents to be repeated according to the typematic rate.I'd like to read the keyboard status within a thread 100 times per second or so.Thanks.
[275 byte] By [foexxchen] at [2007-9-27 15:00:48]
# 1

Timer changeTimer = new Timer(delay);

public void keyPressed()

{

if (!changeTimer.isRunning()

{

//do the task you wish to do when

a key is first pressed...

timer.start()

}

}

public void changeTimer_actionPerformed(ActionEvent ae)

{

//do the task you wish to be performed

//when a key is being held down

}

Seekely at 2007-7-5 23:01:07 > top of Java-index,Other Topics,Java Game Development...
# 2
set a boolean to true when it is pressed. and set it false when it is released. don't pay attention to the typed events. The answer is no although that is being pushed from the javagaming.org site, everyone wants it.
zparticle at 2007-7-5 23:01:07 > top of Java-index,Other Topics,Java Game Development...
# 3
> The answer is no although that is being> pushed from the javagaming.org site, everyone wants> it.and i can see why - causing an Event dispatch just to set a flag, when the flag is already available from the OS is soooo inefficient!
Abuse at 2007-7-5 23:01:07 > top of Java-index,Other Topics,Java Game Development...
# 4
The other option is to write some JNI code for the OS you want to target.
zparticle at 2007-7-5 23:01:07 > top of Java-index,Other Topics,Java Game Development...