Package com.jme3.input.event
Class KeyInputEvent
java.lang.Object
com.jme3.input.event.InputEvent
com.jme3.input.event.KeyInputEvent
Keyboard key event.
-
Field Summary
Fields inherited from class com.jme3.input.event.InputEvent
consumed, time
-
Constructor Summary
ConstructorDescriptionKeyInputEvent
(int keyCode, char keyChar, boolean pressed, boolean repeating) -
Method Summary
Modifier and TypeMethodDescriptionchar
Returns the key character.int
The key code.boolean
Returns true if this event is key press, false is it was a key release.boolean
Returns true if this event is a key release, false if it was a key press.boolean
Returns true if this event is a repeat event.toString()
Methods inherited from class com.jme3.input.event.InputEvent
getTime, isConsumed, setConsumed, setTime
-
Constructor Details
-
KeyInputEvent
public KeyInputEvent(int keyCode, char keyChar, boolean pressed, boolean repeating)
-
-
Method Details
-
getKeyChar
public char getKeyChar()Returns the key character. Returns 0 if the key has no character.- Returns:
- the key character. 0 if the key has no character.
-
getKeyCode
public int getKeyCode()The key code.See KEY_*** constants in
KeyInput
.- Returns:
- key code.
-
isPressed
public boolean isPressed()Returns true if this event is key press, false is it was a key release.- Returns:
- true if this event is key press, false is it was a key release.
-
isRepeating
public boolean isRepeating()Returns true if this event is a repeat event.- Returns:
- true if this event is a repeat event
-
isReleased
public boolean isReleased()Returns true if this event is a key release, false if it was a key press.- Returns:
- true if this event is a key release, false if it was a key press.
-
toString
-