Class Input

java.lang.Object
de.gurkenlabs.litiengine.input.Input

public final class Input extends Object
The static Input class is the LITIENGINE's access point to devices that capture physical player input. It manages input from different devices, i.e. keyboard, mouse or gamepad, and provides a unified API to access this information.
See Also:
  • Method Details

    • gamepads

      public static GamepadManager gamepads()
      Gets the manager for all gamepad input devices.

      The manager provides easy access to the default controller as well as access by gamepad index for mulitplayer games. Gamepads don't need to be added explicitly, the manager supports hot-plugging at runtime and will auto-detect any added/removed gamepads.

      This returns null if Game.config().input().isGamepadSupport() is set to false.

      Returns:
      The gamepad manager.
      See Also:
    • keyboard

      public static IKeyboard keyboard()
      Gets the keyboard input device.
      Returns:
      The keyboard input device.
    • mouse

      public static IMouse mouse()
      Gets the mouse input device.
      Returns:
      The mouse input device.