:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the ShortCut.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_ShortCut: ShortCut ======== **Inherits:** :ref:`Resource` **<** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- A shortcut for binding input. Properties ---------- +-------------------------------------+---------------------------------------------------+ | :ref:`InputEvent` | :ref:`shortcut` | +-------------------------------------+---------------------------------------------------+ Methods ------- +-----------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_as_text` **(** **)** const | +-----------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_shortcut` **(** :ref:`InputEvent` event **)** const | +-----------------------------+-------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_valid` **(** **)** const | +-----------------------------+-------------------------------------------------------------------------------------------------------------------+ Description ----------- A shortcut for binding input. Shortcuts are commonly used for interacting with a :ref:`Control` element from a :ref:`InputEvent`. Property Descriptions --------------------- .. _class_ShortCut_property_shortcut: - :ref:`InputEvent` **shortcut** +----------+---------------------+ | *Setter* | set_shortcut(value) | +----------+---------------------+ | *Getter* | get_shortcut() | +----------+---------------------+ The shortcut's :ref:`InputEvent`. Generally the :ref:`InputEvent` is a keyboard key, though it can be any :ref:`InputEvent`. Method Descriptions ------------------- .. _class_ShortCut_method_get_as_text: - :ref:`String` **get_as_text** **(** **)** const Returns the shortcut's :ref:`InputEvent` as a :ref:`String`. ---- .. _class_ShortCut_method_is_shortcut: - :ref:`bool` **is_shortcut** **(** :ref:`InputEvent` event **)** const Returns ``true`` if the shortcut's :ref:`InputEvent` equals ``event``. ---- .. _class_ShortCut_method_is_valid: - :ref:`bool` **is_valid** **(** **)** const If ``true``, this shortcut is valid.