class_shortcut.rst 2.9 KB

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