class_shortcut.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. ----
  48. .. _class_ShortCut_method_is_shortcut:
  49. - :ref:`bool<class_bool>` **is_shortcut** **(** :ref:`InputEvent<class_InputEvent>` event **)** const
  50. Returns ``true`` if the shortcut's :ref:`InputEvent<class_InputEvent>` equals ``event``.
  51. ----
  52. .. _class_ShortCut_method_is_valid:
  53. - :ref:`bool<class_bool>` **is_valid** **(** **)** const
  54. If ``true``, this shortcut is valid.