class_inputeventwithmodifiers.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the InputEventWithModifiers.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_InputEventWithModifiers:
  6. InputEventWithModifiers
  7. =======================
  8. **Inherits:** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`InputEventGesture<class_InputEventGesture>`, :ref:`InputEventKey<class_InputEventKey>`, :ref:`InputEventMouse<class_InputEventMouse>`
  10. Base class for keys events with modifiers.
  11. Description
  12. -----------
  13. Contains keys events information with modifiers support like :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input<class_Node_method__input>`.
  14. Tutorials
  15. ---------
  16. - :doc:`InputEvent <../tutorials/inputs/inputevent>`
  17. Properties
  18. ----------
  19. +-------------------------+--------------------------------------------------------------------------------+-----------+
  20. | :ref:`bool<class_bool>` | :ref:`alt_pressed<class_InputEventWithModifiers_property_alt_pressed>` | ``false`` |
  21. +-------------------------+--------------------------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`command_pressed<class_InputEventWithModifiers_property_command_pressed>` | ``false`` |
  23. +-------------------------+--------------------------------------------------------------------------------+-----------+
  24. | :ref:`bool<class_bool>` | :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` | ``false`` |
  25. +-------------------------+--------------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` | ``false`` |
  27. +-------------------------+--------------------------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`shift_pressed<class_InputEventWithModifiers_property_shift_pressed>` | ``false`` |
  29. +-------------------------+--------------------------------------------------------------------------------+-----------+
  30. | :ref:`bool<class_bool>` | :ref:`store_command<class_InputEventWithModifiers_property_store_command>` | ``true`` |
  31. +-------------------------+--------------------------------------------------------------------------------+-----------+
  32. Property Descriptions
  33. ---------------------
  34. .. _class_InputEventWithModifiers_property_alt_pressed:
  35. - :ref:`bool<class_bool>` **alt_pressed**
  36. +-----------+------------------------+
  37. | *Default* | ``false`` |
  38. +-----------+------------------------+
  39. | *Setter* | set_alt_pressed(value) |
  40. +-----------+------------------------+
  41. | *Getter* | is_alt_pressed() |
  42. +-----------+------------------------+
  43. State of the :kbd:`Alt` modifier.
  44. ----
  45. .. _class_InputEventWithModifiers_property_command_pressed:
  46. - :ref:`bool<class_bool>` **command_pressed**
  47. +-----------+----------------------------+
  48. | *Default* | ``false`` |
  49. +-----------+----------------------------+
  50. | *Setter* | set_command_pressed(value) |
  51. +-----------+----------------------------+
  52. | *Getter* | is_command_pressed() |
  53. +-----------+----------------------------+
  54. State of the :kbd:`Cmd` modifier.
  55. ----
  56. .. _class_InputEventWithModifiers_property_ctrl_pressed:
  57. - :ref:`bool<class_bool>` **ctrl_pressed**
  58. +-----------+-------------------------+
  59. | *Default* | ``false`` |
  60. +-----------+-------------------------+
  61. | *Setter* | set_ctrl_pressed(value) |
  62. +-----------+-------------------------+
  63. | *Getter* | is_ctrl_pressed() |
  64. +-----------+-------------------------+
  65. State of the :kbd:`Ctrl` modifier.
  66. ----
  67. .. _class_InputEventWithModifiers_property_meta_pressed:
  68. - :ref:`bool<class_bool>` **meta_pressed**
  69. +-----------+-------------------------+
  70. | *Default* | ``false`` |
  71. +-----------+-------------------------+
  72. | *Setter* | set_meta_pressed(value) |
  73. +-----------+-------------------------+
  74. | *Getter* | is_meta_pressed() |
  75. +-----------+-------------------------+
  76. State of the :kbd:`Meta` modifier.
  77. ----
  78. .. _class_InputEventWithModifiers_property_shift_pressed:
  79. - :ref:`bool<class_bool>` **shift_pressed**
  80. +-----------+--------------------------+
  81. | *Default* | ``false`` |
  82. +-----------+--------------------------+
  83. | *Setter* | set_shift_pressed(value) |
  84. +-----------+--------------------------+
  85. | *Getter* | is_shift_pressed() |
  86. +-----------+--------------------------+
  87. State of the :kbd:`Shift` modifier.
  88. ----
  89. .. _class_InputEventWithModifiers_property_store_command:
  90. - :ref:`bool<class_bool>` **store_command**
  91. +-----------+--------------------------+
  92. | *Default* | ``true`` |
  93. +-----------+--------------------------+
  94. | *Setter* | set_store_command(value) |
  95. +-----------+--------------------------+
  96. | *Getter* | is_storing_command() |
  97. +-----------+--------------------------+
  98. If ``true``, pressing :kbd:`Cmd` on macOS or :kbd:`Ctrl` on all other platforms will both be serialized as :ref:`command_pressed<class_InputEventWithModifiers_property_command_pressed>`. If ``false``, those same keys will be serialized as :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` on macOS and :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` on all other platforms.
  99. This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.
  100. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  101. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  102. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  103. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  104. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  105. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`