Package gaiasky.input

Class InputUtils

java.lang.Object
gaiasky.input.InputUtils

public class InputUtils extends Object
Utilities for the input system.
  • Constructor Details

    • InputUtils

      public InputUtils()
  • Method Details

    • physicalToLogicalKeyCode

      public static int physicalToLogicalKeyCode(int physicalKeyCode)
    • physicalKeyCodeToLogicalKeyString

      public static String physicalKeyCodeToLogicalKeyString(int keyCode)
      Converts GDX physical key codes to GLFW logical strings.
      Parameters:
      keyCode - The physical key code.
      Returns:
      The string representing the logical key.
    • getGlfwKeyCode

      public static int getGlfwKeyCode(int gdxKeyCode)
      Returns the GLFW key code corresponding to a GDX key code.
      Parameters:
      gdxKeyCode - The GDX key code.
      Returns:
      The GLFW key code.
    • keyStringToKeyCode

      public static int keyStringToKeyCode(String keyString)
      Converts string representations of keys into key codes (see Input.Keys).
      Parameters:
      keyString - The string representation.
      Returns:
      The key code.