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...")
 
(overhaul to include Prototype)
Line 2: Line 2:
Used for custom keyboard shortcuts/keybindings in mods.
Used for custom keyboard shortcuts/keybindings in mods.
== Properties ==
== Properties ==
=== type ===
Inherits all properties from [[Prototype]].
'''Type''': [[Types/string]]


Has to be "custom-input".
Name is also the name for the event that is raised when they key (combination) is pressed, see [[Tutorial:Script interfaces]].
=== 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 ===
=== key_sequence ===

Revision as of 12:53, 23 January 2018

Basics

Used for custom keyboard shortcuts/keybindings in mods.

Properties

Inherits all properties from Prototype.

Name 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: "ALT + G"
  • "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. [1]

Example to the same key sequence as the clear-cursor hotkey:

key_sequence = ""
linked_game_control = "clear-cursor"

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.