Prototype/CustomInput: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "== Basics == Used for custom keyboard shortcuts/keybindings in mods. == Properties == === type === '''Type''': Types/string Has to be "custom-input". === name === '''Type...")
 
(Removed old prototype docs)
Tag: Replaced
 
(31 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Basics ==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html]
Used for custom keyboard shortcuts/keybindings in mods.
== Properties ==
=== type ===
'''Type''': [[Types/string]]


Has to be "custom-input".
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
=== name ===
'''Type''': [[Types/string]]
 
Unique identification of the prototype. This is also the name for the event that is raised when they key (combination) is pressed. See [[Tutorial:Script interfaces]].
 
=== order ===
'''Type''': [[Types/Order]]
 
=== localised_name ===
'''Type''': [[Types/LocalisedString]]
 
=== localised_description ===
'''Type''': [[Types/LocalisedString]]
 
=== key_sequence ===
'''Type''': [[Types/string]]
 
The default key sequence for this custom input.
 
* " + " is used to seperate two keys: <code>"ALT + G"</code>
* "CONTROL" works, "CTRL" doesnt.
* "mouse-button-2" etc for mouse buttons
 
=== linked_game_control ===
'''Type''': [[Types/string]]
 
'''Default''': ""
 
When a custom-input is linked to a game control it won't show up in the control-settings GUI and will fire when the linked control is pressed. [https://forums.factorio.com/53591]
 
Example to the same key sequence as the clear-cursor hotkey:
<syntaxhighlight lang="lua">key_sequence = ""
linked_game_control = "clear-cursor"</syntaxhighlight>
 
=== consuming ===
'''Type''': [[Types/ConsumingType]]
 
'''Default''': "none"
 
=== enabled ===
'''Type''': [[Types/bool]]
 
'''Default''': true
 
If this custom input is enabled. Disabled custom inputs exist but are not used by the game.

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/CustomInputPrototype.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.