Skip to main content

KeyboardButton

class KeyboardButton

It is responsible for checking and handling keyboard interaction with the game.


public class KeyboardButton

— Constructors (1) —

ConstructorDescription
KeyboardButton()Creates a new KeyboardButton.

— Methods (11) —

NameDescription
boolean isPressed()Returns true if the KeyboardButton is being pressed, false if not.
void setPressed(boolean value)Defines whether or not the KeyboardButton is being pressed to be "value" argument.
boolean isDown()Returns true if the KeyboardButton was pressed, false if not.
void setDown(boolean value)Defines whether or not the KeyboardButton was pressed to be "value" argument.
boolean isLongDown()Returns true if the KeyboardButton has been pressed for a long time, false if not.
void setLongDown(boolean value)Defines whether or not the KeyboardButton has been pressed for a long time to be "value" argument.
boolean isLongPressed()Returns true if the KeyboardButton is being pressed for a long time, false if not.
void setLongPressed(boolean value)Defines whether or not the KeyboardButton is being pressed for a long time to be "value" argument.
String getName()Returns the current KeyboardButton name.
String getPrintableName()Returns the printable name of the KeyboardButton.
boolean isUpperCase()Returns true if KeyboardButton characters are uppercase, false not.