InputEventKey

Inherits: InputEventWithModifiers < InputEvent < Resource < Reference < Object

Category: Core

Brief Description

Input event type for keyboard events.

Properties

boolecho
boolpressed
intscancode
intunicode

Methods

intget_scancode_with_modifiers ( ) const

Description

Stores key presses on the keyboard. Supports key presses, key releases and echo events.

Tutorials

Property Descriptions

Setterset_echo(value)
Getteris_echo()

If true, the key was already pressed before this event. It means the user is holding the key down.


Setterset_pressed(value)
Getteris_pressed()

If true, the key’s state is pressed. If false, the key’s state is released.


Setterset_scancode(value)
Getterget_scancode()

Key scancode, one of the KEY_* constants in @GlobalScope.


Setterset_unicode(value)
Getterget_unicode()

Key unicode identifier when relevant.

Method Descriptions

  • int get_scancode_with_modifiers ( ) const

Returns the scancode combined with modifier keys such as Shift or Alt. See also InputEventWithModifiers.