class_shortcut.rst 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the ShortCut.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_ShortCut:
  6. ShortCut
  7. ========
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. A shortcut for binding input.
  13. Properties
  14. ----------
  15. +-------------------------------------+---------------------------------------------------+
  16. | :ref:`InputEvent<class_InputEvent>` | :ref:`shortcut<class_ShortCut_property_shortcut>` |
  17. +-------------------------------------+---------------------------------------------------+
  18. Methods
  19. -------
  20. +-----------------------------+-------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`String<class_String>` | :ref:`get_as_text<class_ShortCut_method_get_as_text>` **(** **)** const |
  22. +-----------------------------+-------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`is_shortcut<class_ShortCut_method_is_shortcut>` **(** :ref:`InputEvent<class_InputEvent>` event **)** const |
  24. +-----------------------------+-------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_valid<class_ShortCut_method_is_valid>` **(** **)** const |
  26. +-----------------------------+-------------------------------------------------------------------------------------------------------------------+
  27. Description
  28. -----------
  29. A shortcut for binding input.
  30. Shortcuts are commonly used for interacting with a :ref:`Control<class_Control>` element from a :ref:`InputEvent<class_InputEvent>`.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_ShortCut_property_shortcut:
  34. - :ref:`InputEvent<class_InputEvent>` **shortcut**
  35. +----------+---------------------+
  36. | *Setter* | set_shortcut(value) |
  37. +----------+---------------------+
  38. | *Getter* | get_shortcut() |
  39. +----------+---------------------+
  40. The shortcut's :ref:`InputEvent<class_InputEvent>`.
  41. Generally the :ref:`InputEvent<class_InputEvent>` is a keyboard key, though it can be any :ref:`InputEvent<class_InputEvent>`.
  42. Method Descriptions
  43. -------------------
  44. .. _class_ShortCut_method_get_as_text:
  45. - :ref:`String<class_String>` **get_as_text** **(** **)** const
  46. Returns the shortcut's :ref:`InputEvent<class_InputEvent>` as a :ref:`String<class_String>`.
  47. .. _class_ShortCut_method_is_shortcut:
  48. - :ref:`bool<class_bool>` **is_shortcut** **(** :ref:`InputEvent<class_InputEvent>` event **)** const
  49. Returns ``true`` if the shortcut's :ref:`InputEvent<class_InputEvent>` equals ``event``.
  50. .. _class_ShortCut_method_is_valid:
  51. - :ref:`bool<class_bool>` **is_valid** **(** **)** const
  52. If ``true``, this shortcut is valid.