Package net.minecraft.client
Class KeyMapping
java.lang.Object
net.minecraft.client.KeyMapping
- All Implemented Interfaces:
Comparable<KeyMapping>
,IForgeKeyMapping
- Direct Known Subclasses:
ToggleKeyMapping
-
Field Summary
Modifier and TypeFieldDescriptionprivate static Map<String,KeyMapping>
private String
static String
static String
static String
static String
static String
static String
static String
private int
private InputConstants.Key
(package private) boolean
private InputConstants.Key
private IKeyConflictContext
private KeyModifier
private KeyModifier
Forge Startprivate static KeyBindingMap
private String
-
Constructor Summary
ConstructorDescriptionKeyMapping(String p_90821_, int p_90822_, String p_90823_)
KeyMapping(String p_90825_, InputConstants.Type p_90826_, int p_90827_, String p_90828_)
KeyMapping(String description, IKeyConflictContext keyConflictContext, InputConstants.Key keyCode, String category)
Convenience constructor for creating KeyBindings with keyConflictContext set.KeyMapping(String description, IKeyConflictContext keyConflictContext, InputConstants.Type inputType, int keyCode, String category)
Convenience constructor for creating KeyBindings with keyConflictContext set.KeyMapping(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputConstants.Key keyCode, String category)
Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set.KeyMapping(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputConstants.Type inputType, int keyCode, String category)
Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
click(InputConstants.Key p_90836_)
int
compareTo(KeyMapping p_90841_)
boolean
createNameSupplier(String p_90843_)
getKey()
getName()
boolean
boolean
isDown()
boolean
boolean
matches(int p_90833_, int p_90834_)
boolean
matchesMouse(int p_90831_)
private void
release()
static void
static void
boolean
same(KeyMapping p_90851_)
static void
set(InputConstants.Key p_90838_, boolean p_90839_)
static void
setAll()
void
setDown(boolean p_90846_)
void
setKey(InputConstants.Key p_90849_)
void
setKeyConflictContext(IKeyConflictContext keyConflictContext)
void
setKeyModifierAndCode(KeyModifier keyModifier, InputConstants.Key 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.IForgeKeyMapping
hasKeyCodeModifierConflict, isActiveAndMatches, isConflictContextAndModifierActive, setToDefault
-
Field Details
-
ALL
-
MAP
-
CATEGORIES
-
CATEGORY_MOVEMENT
- See Also:
- Constant Field Values
-
CATEGORY_MISC
- See Also:
- Constant Field Values
-
CATEGORY_MULTIPLAYER
- See Also:
- Constant Field Values
-
CATEGORY_GAMEPLAY
- See Also:
- Constant Field Values
-
CATEGORY_INVENTORY
- See Also:
- Constant Field Values
-
CATEGORY_INTERFACE
- See Also:
- Constant Field Values
-
CATEGORY_CREATIVE
- See Also:
- Constant Field Values
-
CATEGORY_SORT_ORDER
-
name
-
defaultKey
-
category
-
key
-
isDown
boolean isDown -
clickCount
private int clickCount -
keyModifierDefault
Forge Start -
keyModifier
-
keyConflictContext
-
-
Constructor Details
-
KeyMapping
-
KeyMapping
-
KeyMapping
public KeyMapping(String description, IKeyConflictContext keyConflictContext, InputConstants.Type inputType, int keyCode, String category)Convenience constructor for creating KeyBindings with keyConflictContext set. -
KeyMapping
public KeyMapping(String description, IKeyConflictContext keyConflictContext, InputConstants.Key keyCode, String category)Convenience constructor for creating KeyBindings with keyConflictContext set. -
KeyMapping
public KeyMapping(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputConstants.Type inputType, int keyCode, String category)Convenience constructor for creating KeyBindings with keyConflictContext and keyModifier set. -
KeyMapping
public KeyMapping(String description, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputConstants.Key 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<KeyMapping>
-
createNameSupplier
-
same
-
isUnbound
public boolean isUnbound() -
matches
public boolean matches(int p_90833_, int p_90834_) -
matchesMouse
public boolean matchesMouse(int p_90831_) -
getTranslatedKeyMessage
-
isDefault
public boolean isDefault() -
saveString
-
setDown
public void setDown(boolean p_90846_) -
getKey
- Specified by:
getKey
in interfaceIForgeKeyMapping
-
setKeyConflictContext
- Specified by:
setKeyConflictContext
in interfaceIForgeKeyMapping
-
getKeyConflictContext
- Specified by:
getKeyConflictContext
in interfaceIForgeKeyMapping
-
getKeyModifierDefault
- Specified by:
getKeyModifierDefault
in interfaceIForgeKeyMapping
-
getKeyModifier
- Specified by:
getKeyModifier
in interfaceIForgeKeyMapping
-
setKeyModifierAndCode
- Specified by:
setKeyModifierAndCode
in interfaceIForgeKeyMapping
-