summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2020-09-29 00:23:51 +1000
committerEric M <itsjusteza@gmail.com>2020-11-19 21:05:45 +1000
commitc92f83d3ca90c49594c9ed79748c0bf5225563d8 (patch)
tree2047b7d246ebe15bb47fdd150ea053292e922ba0 /doc
parent593e35346ab182c36068c3dcfc741eeb7311a19e (diff)
Made serialization of Command toggleable when saving InputEvents.
Made serialization of Command optional. If command is serialized, Control (On Win/Linux) or Meta (on Mac) are not. Example use case: You are on Windows and you set a shortcut to be Control + E. This would serialize as Command=true and Control=true. If you then run this project on Mac, you would need to press Command AND Control to activate the shortcut - which is not what is intended. Now, you can set store_command to true, and it will only serialize to Command = true (no Control serialized). On Windows, this means Control. On Mac, it means only command.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/InputEventWithModifiers.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml
index 667879a922..dd782209e5 100644
--- a/doc/classes/InputEventWithModifiers.xml
+++ b/doc/classes/InputEventWithModifiers.xml
@@ -27,6 +27,10 @@
<member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false">
State of the [kbd]Shift[/kbd] modifier.
</member>
+ <member name="store_command" type="bool" setter="set_store_command" getter="is_storing_command" default="true">
+ If [code]true[/code], pressing [kbd]Cmd[/kbd] on macOS or [kbd]Ctrl[/kbd] on all other platforms will both be serialized as [member command]. If [code]false[/code], those same keys will be serialized as [member meta] on macOS and [member control] on all other platforms.
+ This aids with cross-platform compatibility when developing e.g. on Windows for macOS, or vice-versa.
+ </member>
</members>
<constants>
</constants>