Package playn.java

Class JavaInput

java.lang.Object
playn.core.Input
playn.java.JavaInput

public class JavaInput
extends Input
  • Constructor Details

  • Method Details

    • postKey

      public void postKey​(long time, Key key, boolean pressed, char typedCh, int modFlags)
      Posts a key event received from elsewhere (i.e. a native UI component). This is useful for applications that are using GL in Canvas mode and sharing keyboard focus with other (non-GL) components. The event will be queued and dispatched on the next frame, after GL keyboard events.
      Parameters:
      time - the time (in millis since epoch) at which the event was generated, or 0 if N/A.
      key - the key that was pressed or released, or null for a char typed event
      pressed - whether the key was pressed or released, ignored if key is null
      typedCh - the character that was typed, ignored if key is not null
      modFlags - modifier key state flags (generated by Input.modifierFlags(boolean, boolean, boolean, boolean))
    • hasMouse

      public boolean hasMouse()
      Overrides:
      hasMouse in class Input
    • hasHardwareKeyboard

      public boolean hasHardwareKeyboard()
      Overrides:
      hasHardwareKeyboard in class Input
    • hasTouch

      public boolean hasTouch()
      Overrides:
      hasTouch in class Input