public class KeyInputEvent extends InputEvent
consumed, time
Constructor and Description |
---|
KeyInputEvent(int keyCode,
char keyChar,
boolean pressed,
boolean repeating) |
Modifier and Type | Method and Description |
---|---|
char |
getKeyChar()
Returns the key character.
|
int |
getKeyCode()
The key code.
|
boolean |
isPressed()
Returns true if this event is key press, false is it was a key release.
|
boolean |
isReleased()
Returns true if this event is a key release, false if it was a key press.
|
boolean |
isRepeating()
Returns true if this event is a repeat event.
|
java.lang.String |
toString() |
getTime, isConsumed, setConsumed, setTime
public KeyInputEvent(int keyCode, char keyChar, boolean pressed, boolean repeating)
public char getKeyChar()
public int getKeyCode()
See KEY_*** constants in KeyInput
.
public boolean isPressed()
public boolean isRepeating()
public boolean isReleased()
public java.lang.String toString()
toString
in class java.lang.Object