Package net.minecraft.client.option
Class KeyBinding
java.lang.Object
net.minecraft.client.option.KeyBinding
- All Implemented Interfaces:
Comparable<KeyBinding>
- Direct Known Subclasses:
StickyKeyBinding
@Environment(CLIENT) public class KeyBinding extends Object implements Comparable<KeyBinding>
- Mappings:
Namespace Name official dqh
intermediary net/minecraft/class_304
named net/minecraft/client/option/KeyBinding
-
Field Summary
Fields Modifier and Type Field Description private InputUtil.Key
boundKey
private String
category
private static Map<String,Integer>
categoryOrderMap
private InputUtil.Key
defaultKey
private static Set<String>
keyCategories
private static Map<String,KeyBinding>
keysById
private static Map<InputUtil.Key,KeyBinding>
keyToBindings
private boolean
pressed
private int
timesPressed
private String
translationKey
-
Constructor Summary
Constructors Constructor Description KeyBinding(String translationKey, int code, String category)
KeyBinding(String translationKey, InputUtil.Type type, int code, String category)
-
Method Summary
Modifier and Type Method Description int
compareTo(KeyBinding keyBinding)
boolean
equals(KeyBinding other)
Text
getBoundKeyLocalizedText()
String
getBoundKeyTranslationKey()
String
getCategory()
InputUtil.Key
getDefaultKey()
static Supplier<Text>
getLocalizedName(String id)
String
getTranslationKey()
boolean
isDefault()
boolean
isPressed()
boolean
isUnbound()
boolean
matchesKey(int keyCode, int scanCode)
boolean
matchesMouse(int code)
static void
onKeyPressed(InputUtil.Key key)
private void
reset()
void
setBoundKey(InputUtil.Key boundKey)
static void
setKeyPressed(InputUtil.Key key, boolean pressed)
void
setPressed(boolean pressed)
static void
unpressAll()
static void
updateKeysByCode()
static void
updatePressedStates()
boolean
wasPressed()
-
Field Details
-
keysById
- Mappings:
Namespace Name Mixin selector official a
Ldqh;a:Ljava/util/Map;
intermediary field_1657
Lnet/minecraft/class_304;field_1657:Ljava/util/Map;
named keysById
Lnet/minecraft/client/option/KeyBinding;keysById:Ljava/util/Map;
-
keyToBindings
- Mappings:
Namespace Name Mixin selector official b
Ldqh;b:Ljava/util/Map;
intermediary field_1658
Lnet/minecraft/class_304;field_1658:Ljava/util/Map;
named keyToBindings
Lnet/minecraft/client/option/KeyBinding;keyToBindings:Ljava/util/Map;
-
keyCategories
- Mappings:
Namespace Name Mixin selector official c
Ldqh;c:Ljava/util/Set;
intermediary field_1652
Lnet/minecraft/class_304;field_1652:Ljava/util/Set;
named keyCategories
Lnet/minecraft/client/option/KeyBinding;keyCategories:Ljava/util/Set;
-
categoryOrderMap
- Mappings:
Namespace Name Mixin selector official d
Ldqh;d:Ljava/util/Map;
intermediary field_1656
Lnet/minecraft/class_304;field_1656:Ljava/util/Map;
named categoryOrderMap
Lnet/minecraft/client/option/KeyBinding;categoryOrderMap:Ljava/util/Map;
-
translationKey
- Mappings:
Namespace Name Mixin selector official e
Ldqh;e:Ljava/lang/String;
intermediary field_1660
Lnet/minecraft/class_304;field_1660:Ljava/lang/String;
named translationKey
Lnet/minecraft/client/option/KeyBinding;translationKey:Ljava/lang/String;
-
defaultKey
- Mappings:
Namespace Name Mixin selector official f
Ldqh;f:Ldkt$a;
intermediary field_1654
Lnet/minecraft/class_304;field_1654:Lnet/minecraft/class_3675$class_306;
named defaultKey
Lnet/minecraft/client/option/KeyBinding;defaultKey:Lnet/minecraft/client/util/InputUtil$Key;
-
category
- Mappings:
Namespace Name Mixin selector official g
Ldqh;g:Ljava/lang/String;
intermediary field_1659
Lnet/minecraft/class_304;field_1659:Ljava/lang/String;
named category
Lnet/minecraft/client/option/KeyBinding;category:Ljava/lang/String;
-
boundKey
- Mappings:
Namespace Name Mixin selector official h
Ldqh;h:Ldkt$a;
intermediary field_1655
Lnet/minecraft/class_304;field_1655:Lnet/minecraft/class_3675$class_306;
named boundKey
Lnet/minecraft/client/option/KeyBinding;boundKey:Lnet/minecraft/client/util/InputUtil$Key;
-
pressed
private boolean pressed- Mappings:
Namespace Name Mixin selector official i
Ldqh;i:Z
intermediary field_1653
Lnet/minecraft/class_304;field_1653:Z
named pressed
Lnet/minecraft/client/option/KeyBinding;pressed:Z
-
timesPressed
private int timesPressed- Mappings:
Namespace Name Mixin selector official j
Ldqh;j:I
intermediary field_1661
Lnet/minecraft/class_304;field_1661:I
named timesPressed
Lnet/minecraft/client/option/KeyBinding;timesPressed:I
-
-
Constructor Details
-
KeyBinding
- Mappings:
Namespace Name Mixin selector official <init>
Ldqh;<init>(Ljava/lang/String;ILjava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_304;<init>(Ljava/lang/String;ILjava/lang/String;)V
named <init>
Lnet/minecraft/client/option/KeyBinding;<init>(Ljava/lang/String;ILjava/lang/String;)V
-
KeyBinding
- Mappings:
Namespace Name Mixin selector official <init>
Ldqh;<init>(Ljava/lang/String;Ldkt$b;ILjava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_304;<init>(Ljava/lang/String;Lnet/minecraft/class_3675$class_307;ILjava/lang/String;)V
named <init>
Lnet/minecraft/client/option/KeyBinding;<init>(Ljava/lang/String;Lnet/minecraft/client/util/InputUtil$Type;ILjava/lang/String;)V
-
-
Method Details
-
onKeyPressed
- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(Ldkt$a;)V
intermediary method_1420
Lnet/minecraft/class_304;method_1420(Lnet/minecraft/class_3675$class_306;)V
named onKeyPressed
Lnet/minecraft/client/option/KeyBinding;onKeyPressed(Lnet/minecraft/client/util/InputUtil$Key;)V
-
setKeyPressed
- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(Ldkt$a;Z)V
intermediary method_1416
Lnet/minecraft/class_304;method_1416(Lnet/minecraft/class_3675$class_306;Z)V
named setKeyPressed
Lnet/minecraft/client/option/KeyBinding;setKeyPressed(Lnet/minecraft/client/util/InputUtil$Key;Z)V
-
updatePressedStates
public static void updatePressedStates()- Mappings:
Namespace Name Mixin selector official a
Ldqh;a()V
intermediary method_1424
Lnet/minecraft/class_304;method_1424()V
named updatePressedStates
Lnet/minecraft/client/option/KeyBinding;updatePressedStates()V
-
unpressAll
public static void unpressAll()- Mappings:
Namespace Name Mixin selector official b
Ldqh;b()V
intermediary method_1437
Lnet/minecraft/class_304;method_1437()V
named unpressAll
Lnet/minecraft/client/option/KeyBinding;unpressAll()V
-
updateKeysByCode
public static void updateKeysByCode()- Mappings:
Namespace Name Mixin selector official c
Ldqh;c()V
intermediary method_1426
Lnet/minecraft/class_304;method_1426()V
named updateKeysByCode
Lnet/minecraft/client/option/KeyBinding;updateKeysByCode()V
-
isPressed
public boolean isPressed()- Mappings:
Namespace Name Mixin selector official d
Ldqh;d()Z
intermediary method_1434
Lnet/minecraft/class_304;method_1434()Z
named isPressed
Lnet/minecraft/client/option/KeyBinding;isPressed()Z
-
getCategory
- Mappings:
Namespace Name Mixin selector official e
Ldqh;e()Ljava/lang/String;
intermediary method_1423
Lnet/minecraft/class_304;method_1423()Ljava/lang/String;
named getCategory
Lnet/minecraft/client/option/KeyBinding;getCategory()Ljava/lang/String;
-
wasPressed
public boolean wasPressed()- Mappings:
Namespace Name Mixin selector official f
Ldqh;f()Z
intermediary method_1436
Lnet/minecraft/class_304;method_1436()Z
named wasPressed
Lnet/minecraft/client/option/KeyBinding;wasPressed()Z
-
reset
private void reset()- Mappings:
Namespace Name Mixin selector official m
Ldqh;m()V
intermediary method_1425
Lnet/minecraft/class_304;method_1425()V
named reset
Lnet/minecraft/client/option/KeyBinding;reset()V
-
getTranslationKey
- Mappings:
Namespace Name Mixin selector official g
Ldqh;g()Ljava/lang/String;
intermediary method_1431
Lnet/minecraft/class_304;method_1431()Ljava/lang/String;
named getTranslationKey
Lnet/minecraft/client/option/KeyBinding;getTranslationKey()Ljava/lang/String;
-
getDefaultKey
- Mappings:
Namespace Name Mixin selector official h
Ldqh;h()Ldkt$a;
intermediary method_1429
Lnet/minecraft/class_304;method_1429()Lnet/minecraft/class_3675$class_306;
named getDefaultKey
Lnet/minecraft/client/option/KeyBinding;getDefaultKey()Lnet/minecraft/client/util/InputUtil$Key;
-
setBoundKey
- Mappings:
Namespace Name Mixin selector official b
Ldqh;b(Ldkt$a;)V
intermediary method_1422
Lnet/minecraft/class_304;method_1422(Lnet/minecraft/class_3675$class_306;)V
named setBoundKey
Lnet/minecraft/client/option/KeyBinding;setBoundKey(Lnet/minecraft/client/util/InputUtil$Key;)V
-
compareTo
- Specified by:
compareTo
in interfaceComparable<KeyBinding>
- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(Ldqh;)I
intermediary method_1430
Lnet/minecraft/class_304;method_1430(Lnet/minecraft/class_304;)I
named compareTo
Lnet/minecraft/client/option/KeyBinding;compareTo(Lnet/minecraft/client/option/KeyBinding;)I
-
getLocalizedName
- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(Ljava/lang/String;)Ljava/util/function/Supplier;
intermediary method_1419
Lnet/minecraft/class_304;method_1419(Ljava/lang/String;)Ljava/util/function/Supplier;
named getLocalizedName
Lnet/minecraft/client/option/KeyBinding;getLocalizedName(Ljava/lang/String;)Ljava/util/function/Supplier;
-
equals
- Mappings:
Namespace Name Mixin selector official b
Ldqh;b(Ldqh;)Z
intermediary method_1435
Lnet/minecraft/class_304;method_1435(Lnet/minecraft/class_304;)Z
named equals
Lnet/minecraft/client/option/KeyBinding;equals(Lnet/minecraft/client/option/KeyBinding;)Z
-
isUnbound
public boolean isUnbound()- Mappings:
Namespace Name Mixin selector official i
Ldqh;i()Z
intermediary method_1415
Lnet/minecraft/class_304;method_1415()Z
named isUnbound
Lnet/minecraft/client/option/KeyBinding;isUnbound()Z
-
matchesKey
public boolean matchesKey(int keyCode, int scanCode)- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(II)Z
intermediary method_1417
Lnet/minecraft/class_304;method_1417(II)Z
named matchesKey
Lnet/minecraft/client/option/KeyBinding;matchesKey(II)Z
-
matchesMouse
public boolean matchesMouse(int code)- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(I)Z
intermediary method_1433
Lnet/minecraft/class_304;method_1433(I)Z
named matchesMouse
Lnet/minecraft/client/option/KeyBinding;matchesMouse(I)Z
-
getBoundKeyLocalizedText
- Mappings:
Namespace Name Mixin selector official j
Ldqh;j()Loi;
intermediary method_16007
Lnet/minecraft/class_304;method_16007()Lnet/minecraft/class_2561;
named getBoundKeyLocalizedText
Lnet/minecraft/client/option/KeyBinding;getBoundKeyLocalizedText()Lnet/minecraft/text/Text;
-
isDefault
public boolean isDefault()- Mappings:
Namespace Name Mixin selector official k
Ldqh;k()Z
intermediary method_1427
Lnet/minecraft/class_304;method_1427()Z
named isDefault
Lnet/minecraft/client/option/KeyBinding;isDefault()Z
-
getBoundKeyTranslationKey
- Mappings:
Namespace Name Mixin selector official l
Ldqh;l()Ljava/lang/String;
intermediary method_1428
Lnet/minecraft/class_304;method_1428()Ljava/lang/String;
named getBoundKeyTranslationKey
Lnet/minecraft/client/option/KeyBinding;getBoundKeyTranslationKey()Ljava/lang/String;
-
setPressed
public void setPressed(boolean pressed)- Mappings:
Namespace Name Mixin selector official a
Ldqh;a(Z)V
intermediary method_23481
Lnet/minecraft/class_304;method_23481(Z)V
named setPressed
Lnet/minecraft/client/option/KeyBinding;setPressed(Z)V
-