public class KeyBinding extends java.lang.Object implements java.lang.Comparable<KeyBinding>, IForgeKeybinding
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.Integer> |
CATEGORY_ORDER |
private static KeyBindingMap |
HASH |
private static java.util.Map<java.lang.String,KeyBinding> |
KEYBIND_ARRAY |
private static java.util.Set<java.lang.String> |
KEYBIND_SET |
private java.lang.String |
keyCategory |
private InputMappings.Input |
keyCode |
private InputMappings.Input |
keyCodeDefault |
private IKeyConflictContext |
keyConflictContext |
private java.lang.String |
keyDescription |
private KeyModifier |
keyModifier |
private KeyModifier |
keyModifierDefault
Forge Start
|
private boolean |
pressed |
private int |
pressTime |
Constructor and Description |
---|
KeyBinding(java.lang.String description,
IKeyConflictContext keyConflictContext,
InputMappings.Input keyCode,
java.lang.String category)
Convenience constructor for creating KeyBindings with keyConflictContext set.
|
KeyBinding(java.lang.String description,
IKeyConflictContext keyConflictContext,
InputMappings.Type inputType,
int keyCode,
java.lang.String category)
Convenience constructor for creating KeyBindings with keyConflictContext set.
|
KeyBinding(java.lang.String description,
IKeyConflictContext keyConflictContext,
KeyModifier keyModifier,
InputMappings.Input keyCode,
java.lang.String category)
Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set.
|
KeyBinding(java.lang.String description,
IKeyConflictContext keyConflictContext,
KeyModifier keyModifier,
InputMappings.Type inputType,
int keyCode,
java.lang.String category)
Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set.
|
KeyBinding(java.lang.String description,
InputMappings.Type type,
int code,
java.lang.String category) |
KeyBinding(java.lang.String description,
int keyCode,
java.lang.String category) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyBinding, hasKeyCodeModifierConflict, isActiveAndMatches, setToDefault
private static final java.util.Map<java.lang.String,KeyBinding> KEYBIND_ARRAY
private static final KeyBindingMap HASH
private static final java.util.Set<java.lang.String> KEYBIND_SET
private static final java.util.Map<java.lang.String,java.lang.Integer> CATEGORY_ORDER
private final java.lang.String keyDescription
private final InputMappings.Input keyCodeDefault
private final java.lang.String keyCategory
private InputMappings.Input keyCode
private boolean pressed
private int pressTime
private KeyModifier keyModifierDefault
private KeyModifier keyModifier
private IKeyConflictContext keyConflictContext
public KeyBinding(java.lang.String description, int keyCode, java.lang.String category)
public KeyBinding(java.lang.String description, InputMappings.Type type, int code, java.lang.String category)
public KeyBinding(java.lang.String description, IKeyConflictContext keyConflictContext, InputMappings.Type inputType, int keyCode, java.lang.String category)
public KeyBinding(java.lang.String description, IKeyConflictContext keyConflictContext, InputMappings.Input keyCode, java.lang.String category)
public KeyBinding(java.lang.String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Type inputType, int keyCode, java.lang.String category)
public KeyBinding(java.lang.String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Input keyCode, java.lang.String category)
public static void onTick(InputMappings.Input key)
public static void setKeyBindState(InputMappings.Input key, boolean held)
public static void updateKeyBindState()
public static void unPressAllKeys()
public static void resetKeyBindingArrayAndHash()
public boolean isKeyDown()
public java.lang.String getKeyCategory()
public boolean isPressed()
private void unpressKey()
public java.lang.String getKeyDescription()
public InputMappings.Input getDefault()
public void bind(InputMappings.Input key)
public int compareTo(KeyBinding p_compareTo_1_)
compareTo
in interface java.lang.Comparable<KeyBinding>
public static java.util.function.Supplier<java.lang.String> getDisplayString(java.lang.String key)
public boolean conflicts(KeyBinding binding)
public boolean isInvalid()
public boolean matchesKey(int keysym, int scancode)
public boolean matchesMouseKey(int key)
public java.lang.String getLocalizedName()
public boolean isDefault()
public java.lang.String getTranslationKey()
public InputMappings.Input getKey()
getKey
in interface IForgeKeybinding
public void setKeyConflictContext(IKeyConflictContext keyConflictContext)
setKeyConflictContext
in interface IForgeKeybinding
public IKeyConflictContext getKeyConflictContext()
getKeyConflictContext
in interface IForgeKeybinding
public KeyModifier getKeyModifierDefault()
getKeyModifierDefault
in interface IForgeKeybinding
public KeyModifier getKeyModifier()
getKeyModifier
in interface IForgeKeybinding
public void setKeyModifierAndCode(KeyModifier keyModifier, InputMappings.Input keyCode)
setKeyModifierAndCode
in interface IForgeKeybinding
public void setPressed(boolean valueIn)