123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the InputEventKey.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_InputEventKey:
- InputEventKey
- =============
- **Inherits:** :ref:`InputEventWithModifiers<class_InputEventWithModifiers>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
- **Category:** Core
- Brief Description
- -----------------
- Input event type for keyboard events.
- Properties
- ----------
- +-------------------------+--------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`echo<class_InputEventKey_property_echo>` |
- +-------------------------+--------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventKey_property_pressed>` |
- +-------------------------+--------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`scancode<class_InputEventKey_property_scancode>` |
- +-------------------------+--------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`unicode<class_InputEventKey_property_unicode>` |
- +-------------------------+--------------------------------------------------------+
- Methods
- -------
- +-----------------------+--------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_scancode_with_modifiers<class_InputEventKey_method_get_scancode_with_modifiers>` **(** **)** const |
- +-----------------------+--------------------------------------------------------------------------------------------------------------+
- Description
- -----------
- Stores key presses on the keyboard. Supports key presses, key releases and :ref:`echo<class_InputEventKey_property_echo>` events.
- Tutorials
- ---------
- - :doc:`../tutorials/inputs/inputevent`
- Property Descriptions
- ---------------------
- .. _class_InputEventKey_property_echo:
- - :ref:`bool<class_bool>` **echo**
- +----------+-----------------+
- | *Setter* | set_echo(value) |
- +----------+-----------------+
- | *Getter* | is_echo() |
- +----------+-----------------+
- If ``true``, the key was already pressed before this event. It means the user is holding the key down.
- ----
- .. _class_InputEventKey_property_pressed:
- - :ref:`bool<class_bool>` **pressed**
- +----------+--------------------+
- | *Setter* | set_pressed(value) |
- +----------+--------------------+
- | *Getter* | is_pressed() |
- +----------+--------------------+
- If ``true``, the key's state is pressed. If ``false``, the key's state is released.
- ----
- .. _class_InputEventKey_property_scancode:
- - :ref:`int<class_int>` **scancode**
- +----------+---------------------+
- | *Setter* | set_scancode(value) |
- +----------+---------------------+
- | *Getter* | get_scancode() |
- +----------+---------------------+
- Key scancode, one of the ``KEY_*`` constants in :ref:`@GlobalScope<class_@GlobalScope>`.
- ----
- .. _class_InputEventKey_property_unicode:
- - :ref:`int<class_int>` **unicode**
- +----------+--------------------+
- | *Setter* | set_unicode(value) |
- +----------+--------------------+
- | *Getter* | get_unicode() |
- +----------+--------------------+
- Key unicode identifier when relevant.
- Method Descriptions
- -------------------
- .. _class_InputEventKey_method_get_scancode_with_modifiers:
- - :ref:`int<class_int>` **get_scancode_with_modifiers** **(** **)** const
- Returns the scancode combined with modifier keys such as ``Shift`` or ``Alt``. See also :ref:`InputEventWithModifiers<class_InputEventWithModifiers>`.
|