Package dev.kyzel.utils
Class Keyboard
java.lang.Object
dev.kyzel.utils.Keyboard
A class to handle keyboard input.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The class that holds properties of a key. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant to represent the A key.static final int
Constant to represent the B key.static final int
Constant to represent the C key.static final int
Constant to represent the D key.static final int
Constant to represent the E key.static final int
Constant to represent the Escape key.static final int
Constant to represent the F key.static final int
Constant to represent the G key.static final int
Constant to represent the H key.static final int
Constant to represent the I key.static final int
Constant to represent the J key.static final int
Constant to represent the K key.static final int
Constant to represent the L key.static final int
Constant to represent the M key.static final int
Constant to represent the N key.static final int
Constant to represent the O key.static final int
Constant to represent the P key.static final int
Constant to represent the Q key.static final int
Constant to represent the R key.static final int
Constant to represent the S key.static final int
Constant to represent the Space key.static final int
Constant to represent the T key.static final int
Constant to represent the U key.static final int
Constant to represent the V key.static final int
Constant to represent the W key.static final int
Constant to represent the X key.static final int
Constant to represent the Y key.static final int
Constant to represent the Z key.static final Keyboard.Key[]
A list of 128 keys. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyListener
Gets the KeyListener of this Keyboard class.static void
update()
Updates the states of each key.
-
Field Details
-
KEY_ESCAPE
public static final int KEY_ESCAPEConstant to represent the Escape key.- See Also:
-
KEY_SPACE
public static final int KEY_SPACEConstant to represent the Space key.- See Also:
-
KEY_A
public static final int KEY_AConstant to represent the A key.- See Also:
-
KEY_B
public static final int KEY_BConstant to represent the B key.- See Also:
-
KEY_C
public static final int KEY_CConstant to represent the C key.- See Also:
-
KEY_D
public static final int KEY_DConstant to represent the D key.- See Also:
-
KEY_E
public static final int KEY_EConstant to represent the E key.- See Also:
-
KEY_F
public static final int KEY_FConstant to represent the F key.- See Also:
-
KEY_G
public static final int KEY_GConstant to represent the G key.- See Also:
-
KEY_H
public static final int KEY_HConstant to represent the H key.- See Also:
-
KEY_I
public static final int KEY_IConstant to represent the I key.- See Also:
-
KEY_J
public static final int KEY_JConstant to represent the J key.- See Also:
-
KEY_K
public static final int KEY_KConstant to represent the K key.- See Also:
-
KEY_L
public static final int KEY_LConstant to represent the L key.- See Also:
-
KEY_M
public static final int KEY_MConstant to represent the M key.- See Also:
-
KEY_N
public static final int KEY_NConstant to represent the N key.- See Also:
-
KEY_O
public static final int KEY_OConstant to represent the O key.- See Also:
-
KEY_P
public static final int KEY_PConstant to represent the P key.- See Also:
-
KEY_Q
public static final int KEY_QConstant to represent the Q key.- See Also:
-
KEY_R
public static final int KEY_RConstant to represent the R key.- See Also:
-
KEY_S
public static final int KEY_SConstant to represent the S key.- See Also:
-
KEY_T
public static final int KEY_TConstant to represent the T key.- See Also:
-
KEY_U
public static final int KEY_UConstant to represent the U key.- See Also:
-
KEY_V
public static final int KEY_VConstant to represent the V key.- See Also:
-
KEY_W
public static final int KEY_WConstant to represent the W key.- See Also:
-
KEY_X
public static final int KEY_XConstant to represent the X key.- See Also:
-
KEY_Y
public static final int KEY_YConstant to represent the Y key.- See Also:
-
KEY_Z
public static final int KEY_ZConstant to represent the Z key.- See Also:
-
keys
A list of 128 keys. Would not be a magic number, but it works.
-
-
Constructor Details
-
Keyboard
public Keyboard()
-
-
Method Details
-
getListener
Gets the KeyListener of this Keyboard class.- Returns:
- the key listener
-
update
public static void update()Updates the states of each key.
-