class_inputeventwithmodifiers.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/InputEventWithModifiers.xml.
  6. .. _class_InputEventWithModifiers:
  7. InputEventWithModifiers
  8. =======================
  9. **Inherits:** :ref:`InputEventFromWindow<class_InputEventFromWindow>` **<** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`InputEventGesture<class_InputEventGesture>`, :ref:`InputEventKey<class_InputEventKey>`, :ref:`InputEventMouse<class_InputEventMouse>`
  11. Base class for keys events with modifiers.
  12. Description
  13. -----------
  14. Contains keys events information with modifiers support like :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input<class_Node_method__input>`.
  15. Tutorials
  16. ---------
  17. - :doc:`InputEvent <../tutorials/inputs/inputevent>`
  18. Properties
  19. ----------
  20. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`alt_pressed<class_InputEventWithModifiers_property_alt_pressed>` | ``false`` |
  22. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  23. | :ref:`bool<class_bool>` | :ref:`command_or_control_autoremap<class_InputEventWithModifiers_property_command_or_control_autoremap>` | ``false`` |
  24. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` | ``false`` |
  26. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  27. | :ref:`bool<class_bool>` | :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` | ``false`` |
  28. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  29. | :ref:`bool<class_bool>` | :ref:`shift_pressed<class_InputEventWithModifiers_property_shift_pressed>` | ``false`` |
  30. +-------------------------+----------------------------------------------------------------------------------------------------------+-----------+
  31. Methods
  32. -------
  33. +-------------------------+------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`is_command_or_control_pressed<class_InputEventWithModifiers_method_is_command_or_control_pressed>` **(** **)** |const| |
  35. +-------------------------+------------------------------------------------------------------------------------------------------------------------------+
  36. Property Descriptions
  37. ---------------------
  38. .. _class_InputEventWithModifiers_property_alt_pressed:
  39. - :ref:`bool<class_bool>` **alt_pressed**
  40. +-----------+------------------------+
  41. | *Default* | ``false`` |
  42. +-----------+------------------------+
  43. | *Setter* | set_alt_pressed(value) |
  44. +-----------+------------------------+
  45. | *Getter* | is_alt_pressed() |
  46. +-----------+------------------------+
  47. State of the :kbd:`Alt` modifier.
  48. ----
  49. .. _class_InputEventWithModifiers_property_command_or_control_autoremap:
  50. - :ref:`bool<class_bool>` **command_or_control_autoremap**
  51. +-----------+-----------------------------------------+
  52. | *Default* | ``false`` |
  53. +-----------+-----------------------------------------+
  54. | *Setter* | set_command_or_control_autoremap(value) |
  55. +-----------+-----------------------------------------+
  56. | *Getter* | is_command_or_control_autoremap() |
  57. +-----------+-----------------------------------------+
  58. Automaticaly use :kbd:`Meta` (:kbd:`Command`) on macOS and :kbd:`Ctrl` on other platforms. If ``true``, :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` and :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` cannot be set.
  59. ----
  60. .. _class_InputEventWithModifiers_property_ctrl_pressed:
  61. - :ref:`bool<class_bool>` **ctrl_pressed**
  62. +-----------+-------------------------+
  63. | *Default* | ``false`` |
  64. +-----------+-------------------------+
  65. | *Setter* | set_ctrl_pressed(value) |
  66. +-----------+-------------------------+
  67. | *Getter* | is_ctrl_pressed() |
  68. +-----------+-------------------------+
  69. State of the :kbd:`Ctrl` modifier.
  70. ----
  71. .. _class_InputEventWithModifiers_property_meta_pressed:
  72. - :ref:`bool<class_bool>` **meta_pressed**
  73. +-----------+-------------------------+
  74. | *Default* | ``false`` |
  75. +-----------+-------------------------+
  76. | *Setter* | set_meta_pressed(value) |
  77. +-----------+-------------------------+
  78. | *Getter* | is_meta_pressed() |
  79. +-----------+-------------------------+
  80. State of the :kbd:`Meta` modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key.
  81. ----
  82. .. _class_InputEventWithModifiers_property_shift_pressed:
  83. - :ref:`bool<class_bool>` **shift_pressed**
  84. +-----------+--------------------------+
  85. | *Default* | ``false`` |
  86. +-----------+--------------------------+
  87. | *Setter* | set_shift_pressed(value) |
  88. +-----------+--------------------------+
  89. | *Getter* | is_shift_pressed() |
  90. +-----------+--------------------------+
  91. State of the :kbd:`Shift` modifier.
  92. Method Descriptions
  93. -------------------
  94. .. _class_InputEventWithModifiers_method_is_command_or_control_pressed:
  95. - :ref:`bool<class_bool>` **is_command_or_control_pressed** **(** **)** |const|
  96. On macOS, returns ``true`` if :kbd:`Meta` (:kbd:`Command`) is pressed.
  97. On other platforms, returns ``true`` if :kbd:`Ctrl` is pressed.
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`