class_shortcut.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. Member Functions
  13. ----------------
  14. +------------------------------+------------------------------------------------------------------------------------------------------------+
  15. | :ref:`String<class_string>` | :ref:`get_as_text<class_ShortCut_get_as_text>` **(** **)** const |
  16. +------------------------------+------------------------------------------------------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`is_shortcut<class_ShortCut_is_shortcut>` **(** :ref:`InputEvent<class_inputevent>` event **)** const |
  18. +------------------------------+------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_valid<class_ShortCut_is_valid>` **(** **)** const |
  20. +------------------------------+------------------------------------------------------------------------------------------------------------+
  21. Member Variables
  22. ----------------
  23. .. _class_ShortCut_shortcut:
  24. - :ref:`InputEvent<class_inputevent>` **shortcut** - The Shortcut's :ref:`InputEvent<class_inputevent>`.
  25. Generally the :ref:`InputEvent<class_inputevent>` is a keyboard key, though it can be any :ref:`InputEvent<class_inputevent>`.
  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. Member Function Description
  31. ---------------------------
  32. .. _class_ShortCut_get_as_text:
  33. - :ref:`String<class_string>` **get_as_text** **(** **)** const
  34. Returns the Shortcut's :ref:`InputEvent<class_inputevent>` as a :ref:`String<class_string>`.
  35. .. _class_ShortCut_is_shortcut:
  36. - :ref:`bool<class_bool>` **is_shortcut** **(** :ref:`InputEvent<class_inputevent>` event **)** const
  37. Returns ``true`` if the Shortcut's :ref:`InputEvent<class_inputevent>` equals ``event``.
  38. .. _class_ShortCut_is_valid:
  39. - :ref:`bool<class_bool>` **is_valid** **(** **)** const
  40. If ``true`` this Shortcut is valid.