mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
daad4aed62
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
45 lines
2.3 KiB
XML
45 lines
2.3 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="InputEventWithModifiers" inherits="InputEventFromWindow" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Base class for keys events with modifiers.
|
|
</brief_description>
|
|
<description>
|
|
Contains keys events information with modifiers support like [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See [method Node._input].
|
|
</description>
|
|
<tutorials>
|
|
<link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="get_modifiers_mask" qualifiers="const">
|
|
<return type="int" enum="KeyModifierMask" />
|
|
<description>
|
|
Returns the keycode combination of modifier keys.
|
|
</description>
|
|
</method>
|
|
<method name="is_command_or_control_pressed" qualifiers="const">
|
|
<return type="bool" />
|
|
<description>
|
|
On macOS, returns [code]true[/code] if [kbd]Meta[/kbd] ([kbd]Command[/kbd]) is pressed.
|
|
On other platforms, returns [code]true[/code] if [kbd]Ctrl[/kbd] is pressed.
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="alt_pressed" type="bool" setter="set_alt_pressed" getter="is_alt_pressed" default="false">
|
|
State of the [kbd]Alt[/kbd] modifier.
|
|
</member>
|
|
<member name="command_or_control_autoremap" type="bool" setter="set_command_or_control_autoremap" getter="is_command_or_control_autoremap" default="false">
|
|
Automatically use [kbd]Meta[/kbd] ([kbd]Command[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If [code]true[/code], [member ctrl_pressed] and [member meta_pressed] cannot be set.
|
|
</member>
|
|
<member name="ctrl_pressed" type="bool" setter="set_ctrl_pressed" getter="is_ctrl_pressed" default="false">
|
|
State of the [kbd]Ctrl[/kbd] modifier.
|
|
</member>
|
|
<member name="meta_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false">
|
|
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.
|
|
</member>
|
|
<member name="shift_pressed" type="bool" setter="set_shift_pressed" getter="is_shift_pressed" default="false">
|
|
State of the [kbd]Shift[/kbd] modifier.
|
|
</member>
|
|
</members>
|
|
</class>
|