InputEventKey¶
Inherits: InputEventWithModifiers < InputEvent < Resource < Reference < Object
Tipo de evento de entrada para eventos de teclado.
Descripción¶
Almacena las pulsaciones de teclas en el teclado. Soporta pulsaciones de teclas, liberaciones de teclas y eventos de echo.
Tutoriales¶
Propiedades¶
|
||
|
||
|
||
|
||
|
Métodos¶
get_physical_scancode_with_modifiers ( ) const |
|
get_scancode_with_modifiers ( ) const |
Descripciones de Propiedades¶
bool echo
Default |
|
Setter |
set_echo(value) |
Getter |
is_echo() |
Si true
, la tecla ya estaba pulsada antes de este evento. Significa que el usuario está manteniendo la tecla pulsada.
int physical_scancode
Default |
|
Setter |
set_physical_scancode(value) |
Getter |
get_physical_scancode() |
Key physical scancode, which corresponds to one of the KeyList constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.
To get a human-readable representation of the InputEventKey
, use OS.get_scancode_string(event.physical_scancode)
where event
is the InputEventKey
.
bool pressed
Default |
|
Setter |
set_pressed(value) |
Getter |
is_pressed() |
Si true
, se pulsa el estado de la tecla. Si false
, el estado de la tecla se libera.
int scancode
Default |
|
Setter |
set_scancode(value) |
Getter |
get_scancode() |
The key scancode, which corresponds to one of the KeyList constants. Represent key in the current keyboard layout.
To get a human-readable representation of the InputEventKey
, use OS.get_scancode_string(event.scancode)
where event
is the InputEventKey
.
int unicode
Default |
|
Setter |
set_unicode(value) |
Getter |
get_unicode() |
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.set_ime_active for more information.
Descripciones de Métodos¶
int get_physical_scancode_with_modifiers ( ) const
Returns the physical 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.get_scancode_string(event.get_physical_scancode_with_modifiers())
where event
is the InputEventKey
.
int get_scancode_with_modifiers ( ) const
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.get_scancode_string(event.get_scancode_with_modifiers())
where event
is the InputEventKey
.