Package gaiasky.interafce
Class KeyBindings
java.lang.Object
gaiasky.interafce.KeyBindings
Contains the key mappings and the actions. This should be persisted somehow
in the future.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
class
A simple program action. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindAction(String name)
Finds an action given its nameGets the keys that trigger the action identified by the given nameMap<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<TreeSet<Integer>>>
Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<TreeSet<Integer>>>
getStringKeys(String actionId)
static void
-
Field Details
-
instance
-
CTRL_L
public static final int CTRL_L- See Also:
- Constant Field Values
-
SHIFT_L
public static final int SHIFT_L- See Also:
- Constant Field Values
-
ALT_L
public static final int ALT_L- See Also:
- Constant Field Values
-
SPECIAL
public static final int[] SPECIAL
-
-
Method Details
-
initialize
public static void initialize() -
getMappings
-
getMappingsInv
public Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<TreeSet<Integer>>> getMappingsInv() -
getSortedMappings
-
getSortedMappingsInv
public Map<KeyBindings.ProgramAction,com.badlogic.gdx.utils.Array<TreeSet<Integer>>> getSortedMappingsInv() -
findAction
Finds an action given its name- Parameters:
name
- The name- Returns:
- The action if it exists
-
getKeys
Gets the keys that trigger the action identified by the given name- Parameters:
actionId
- The action ID- Returns:
- The keys
-
getStringKeys
-