Package net.minecraft.client.settings
Class KeyBinding
java.lang.Object
net.minecraft.client.settings.KeyBinding
- All Implemented Interfaces:
Comparable<KeyBinding>
,IForgeKeybinding
- Direct Known Subclasses:
ToggleableKeyBinding
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map<String,
KeyBinding> private final String
private int
private final InputMappings.Input
(package private) boolean
private InputMappings.Input
private IKeyConflictContext
private KeyModifier
private KeyModifier
Forge Startprivate static final KeyBindingMap
private final String
-
Constructor Summary
ConstructorDescriptionKeyBinding
(String p_i45001_1_, int p_i45001_2_, String p_i45001_3_) KeyBinding
(String p_i47675_1_, InputMappings.Type p_i47675_2_, int p_i47675_3_, String p_i47675_4_) KeyBinding
(String description, IKeyConflictContext keyConflictContext, InputMappings.Input keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext set.KeyBinding
(String description, IKeyConflictContext keyConflictContext, InputMappings.Type inputType, int keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext set.KeyBinding
(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Input keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set.KeyBinding
(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Type inputType, int keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
click
(InputMappings.Input p_197981_0_) int
compareTo
(KeyBinding p_compareTo_1_) boolean
static Supplier<ITextComponent>
createNameSupplier
(String p_193626_0_) getKey()
getName()
boolean
boolean
isDown()
boolean
boolean
matches
(int p_197976_1_, int p_197976_2_) boolean
matchesMouse
(int p_197984_1_) private void
release()
static void
static void
boolean
same
(KeyBinding p_197983_1_) static void
set
(InputMappings.Input p_197980_0_, boolean p_197980_1_) static void
setAll()
void
setDown
(boolean p_225593_1_) void
setKey
(InputMappings.Input p_197979_1_) void
setKeyConflictContext
(IKeyConflictContext keyConflictContext) void
setKeyModifierAndCode
(KeyModifier keyModifier, InputMappings.Input keyCode) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.client.extensions.IForgeKeybinding
getKeyBinding, hasKeyCodeModifierConflict, isActiveAndMatches, isConflictContextAndModifierActive, setToDefault
-
Field Details
-
ALL
-
MAP
-
CATEGORIES
-
CATEGORY_SORT_ORDER
-
name
-
defaultKey
-
category
-
key
-
isDown
boolean isDown -
clickCount
private int clickCount -
keyModifierDefault
Forge Start -
keyModifier
-
keyConflictContext
-
-
Constructor Details
-
KeyBinding
-
KeyBinding
public KeyBinding(String p_i47675_1_, InputMappings.Type p_i47675_2_, int p_i47675_3_, String p_i47675_4_) -
KeyBinding
public KeyBinding(String description, IKeyConflictContext keyConflictContext, InputMappings.Type inputType, int keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext set. -
KeyBinding
public KeyBinding(String description, IKeyConflictContext keyConflictContext, InputMappings.Input keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext set. -
KeyBinding
public KeyBinding(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Type inputType, int keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set. -
KeyBinding
public KeyBinding(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputMappings.Input keyCode, String category) Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set.
-
-
Method Details
-
click
-
set
-
setAll
public static void setAll() -
releaseAll
public static void releaseAll() -
resetMapping
public static void resetMapping() -
isDown
public boolean isDown() -
getCategory
-
consumeClick
public boolean consumeClick() -
release
private void release() -
getName
-
getDefaultKey
-
setKey
-
compareTo
- Specified by:
compareTo
in interfaceComparable<KeyBinding>
-
createNameSupplier
-
same
-
isUnbound
public boolean isUnbound() -
matches
public boolean matches(int p_197976_1_, int p_197976_2_) -
matchesMouse
public boolean matchesMouse(int p_197984_1_) -
getTranslatedKeyMessage
-
isDefault
public boolean isDefault() -
saveString
-
setDown
public void setDown(boolean p_225593_1_) -
getKey
- Specified by:
getKey
in interfaceIForgeKeybinding
-
setKeyConflictContext
- Specified by:
setKeyConflictContext
in interfaceIForgeKeybinding
-
getKeyConflictContext
- Specified by:
getKeyConflictContext
in interfaceIForgeKeybinding
-
getKeyModifierDefault
- Specified by:
getKeyModifierDefault
in interfaceIForgeKeybinding
-
getKeyModifier
- Specified by:
getKeyModifier
in interfaceIForgeKeybinding
-
setKeyModifierAndCode
- Specified by:
setKeyModifierAndCode
in interfaceIForgeKeybinding
-