Skip to main content

KeyboardButton

Complete API reference for KeyboardButton, including constructors, attributes, virtual attributes, and methods.

Package: JAVARuntime

Category: Input

Component: no


public class KeyboardButton

Constructors

SignatureDescription
KeyboardButton(KeyboardButton)Executes KeyboardButton and returns after the underlying engine call finishes.
KeyboardButton()Executes KeyboardButton and returns after the underlying engine call finishes.

Attributes

NameTypeDescription
gamePadButtonKeyboardButtonRepresents the gamePadButton value stored on this instance. Read or assign to update the property.

Virtual Attributes

NameTypeAccessDescription
downbooleanget/setChecks whether the button was just pressed. This returns true only on the first frame it was pressed.
longDownbooleanget/setChecks whether the button was just long-pressed. This returns true only on the first frame it was long-pressed.
longPressedbooleanget/setChecks whether the button is being long-pressed. This returns true on every frame while it remains pressed for a long duration.
nameStringgetReturns the name of the keyboard button.
pressedbooleanget/setChecks whether the button is currently being held down. This returns true on every frame while it remains pressed.
printableNameStringgetReturns the printable name of the keyboard button.
upbooleanget/setChecks whether the button was just released. This returns true only on the first frame after it was released.
upperCasebooleangetChecks if the button is uppercase.