2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 16:08:05 +08:00
<class name= "InputEventWithModifiers" inherits= "InputEventFromWindow" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-13 04:42:36 +08:00
<brief_description >
2023-04-28 07:35:33 +08:00
Abstract base class for input events affected by modifier keys like [kbd]Shift[/kbd] and [kbd]Alt[/kbd].
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2023-04-28 07:35:33 +08:00
Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input].
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
2023-04-28 07:35:33 +08:00
<link title= "Using InputEvent" > $DOCS_URL/tutorials/inputs/inputevent.html</link>
2017-09-13 04:42:36 +08:00
</tutorials>
2022-09-02 17:37:48 +08:00
<methods >
2022-12-11 07:21:22 +08:00
<method name= "get_modifiers_mask" qualifiers= "const" >
2023-06-15 22:06:22 +08:00
<return type= "int" enum= "KeyModifierMask" is_bitfield= "true" />
2022-12-11 07:21:22 +08:00
<description >
Returns the keycode combination of modifier keys.
</description>
</method>
2022-09-02 17:37:48 +08:00
<method name= "is_command_or_control_pressed" qualifiers= "const" >
<return type= "bool" />
<description >
2023-08-13 06:11:22 +08:00
On macOS, returns [code]true[/code] if [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) is pressed.
2022-09-02 17:37:48 +08:00
On other platforms, returns [code]true[/code] if [kbd]Ctrl[/kbd] is pressed.
</description>
</method>
</methods>
2017-09-13 04:42:36 +08:00
<members >
2021-04-25 04:33:50 +08:00
<member name= "alt_pressed" type= "bool" setter= "set_alt_pressed" getter= "is_alt_pressed" default= "false" >
2020-03-10 18:41:36 +08:00
State of the [kbd]Alt[/kbd] modifier.
2017-09-13 04:42:36 +08:00
</member>
2022-09-02 17:37:48 +08:00
<member name= "command_or_control_autoremap" type= "bool" setter= "set_command_or_control_autoremap" getter= "is_command_or_control_autoremap" default= "false" >
2023-08-13 06:11:22 +08:00
Automatically use [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If [code]true[/code], [member ctrl_pressed] and [member meta_pressed] cannot be set.
2017-09-13 04:42:36 +08:00
</member>
2021-04-25 04:33:50 +08:00
<member name= "ctrl_pressed" type= "bool" setter= "set_ctrl_pressed" getter= "is_ctrl_pressed" default= "false" >
2020-03-10 18:41:36 +08:00
State of the [kbd]Ctrl[/kbd] modifier.
2017-09-13 04:42:36 +08:00
</member>
2021-04-25 04:33:50 +08:00
<member name= "meta_pressed" type= "bool" setter= "set_meta_pressed" getter= "is_meta_pressed" default= "false" >
2022-09-02 17:37:48 +08:00
State of the [kbd]Meta[/kbd] modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key.
2017-09-13 04:42:36 +08:00
</member>
2021-04-25 04:33:50 +08:00
<member name= "shift_pressed" type= "bool" setter= "set_shift_pressed" getter= "is_shift_pressed" default= "false" >
2020-03-10 18:41:36 +08:00
State of the [kbd]Shift[/kbd] modifier.
2017-09-13 04:42:36 +08:00
</member>
</members>
</class>