Class KeyInputEvent

java.lang.Object
com.jme3.input.event.InputEvent
com.jme3.input.event.KeyInputEvent

public class KeyInputEvent extends InputEvent
Keyboard key event.
  • 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

      public String toString()
      Overrides:
      toString in class Object