Class KeyBindings

java.lang.Object
gaiasky.gui.main.KeyBindings

public class KeyBindings extends Object
Defines keyboard bindings to actions.
  • Field Details

  • Method Details

    • initialize

      public static void initialize()
    • initialize

      public static void initialize(boolean force)
    • getMappings

      public Map<TreeSet<Integer>, KeyBindings.ProgramAction> getMappings()
    • getSortedMappingsInv

      public Map<KeyBindings.ProgramAction, com.badlogic.gdx.utils.Array<TreeSet<Integer>>> getSortedMappingsInv()
    • findAction

      public KeyBindings.ProgramAction findAction(String name)
      Finds an action given its name
      Parameters:
      name - The name
      Returns:
      The action if it exists
    • getKeys

      public TreeSet<Integer> getKeys(String actionId)
      Gets the first keys found that trigger the action identified by the given name. If many sets of keys are assigned to the same action, only the first ones are returned.
      Parameters:
      actionId - The action ID.
      Returns:
      The keys.
    • getAllKeys

      public List<TreeSet<Integer>> getAllKeys(String actionId)
      Gets all the sets of keys that trigger the action identified by the given name.
      Parameters:
      actionId - The action ID.
      Returns:
      The list of key sets.
    • getStringKeys

      public String getStringKeys(String actionId)
    • getStringKeys

      public String[] getStringKeys(String actionId, boolean allSets)
    • getStringKeys

      public String[] getStringKeys(String actionId, String join, boolean allSets)
    • getStringArrayKeys

      public String[] getStringArrayKeys(String actionId)