Key
Complete API reference for Key, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Input
Component: no
public class Key
Constructors
| Signature | Description |
|---|---|
Key(Key) | Executes Key and returns after the underlying engine call finishes. |
Key(String) | Executes Key and returns after the underlying engine call finishes. |
Attributes
| Name | Type | Description |
|---|---|---|
key | Key | Represents the key value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|---|---|---|
down | boolean | get | Checks whether the Key was just pressed. This returns true only on the first frame it was pressed. |
name | String | get | Returns the name of the Key. |
pressed | boolean | get | Checks whether the Key is currently being held down. This returns true on every frame while it remains pressed. |
up | boolean | get | Checks whether the Key was just released. This returns true only on the first frame after it was released. |
Methods
| Signature | Returns | Description |
|---|---|---|
requestPress(Object) | void | Registers that the key is being held down by the specified reference. |
releasePress(Object) | void | Unregisters the key press held by the specified reference. |