Struct InputEventKey
Input event type for keyboard events.
struct InputEventKey
;
Stores key presses on the keyboard. Supports key presses, key releases and echo events.
Properties
| Name | Type | Description |
|---|---|---|
echo[get, set]
|
bool | If true, the key was already pressed before this event. It means the user is holding the key down.
|
pressed[get, set]
|
bool | If true, the key's state is pressed. If false, the key's state is released.
|
scancode[get, set]
|
long | The key scancode, which corresponds to one of the keylist constants.
To get a human-readable representation of the InputEventKey, use OS where event is the InputEventKey.
|
unicode[get, set]
|
long | The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See OS for more information.
|
Methods
| Name | Description |
|---|---|
getScancode
|
|
getScancodeWithModifiers
|
Returns the scancode combined with modifier keys such as Shift or Alt. See also InputEventWithModifiers.
To get a human-readable representation of the InputEventKey with modifiers, use OS where event is the InputEventKey.
|
getUnicode
|
|
setEcho
|
|
setPressed
|
|
setScancode
|
|
setUnicode
|