Prototype/CustomInput: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(→‎Properties: make it more clear that "name" has some special properties)
(Removed old prototype docs)
Tag: Replaced
 
(29 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 ==
Inherits all properties from [[Prototype]].


=== name ===
</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>
:''See [[Prototype#name]]''
 
Inherited from [[Prototype]]. It is also the name for the event that is raised when they key (combination) is pressed, see [[Tutorial:Script interfaces]].
 
=== 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.