Factorio Prototype DocsVersion 2.0.26

CustomInputPrototype 'custom-input' changed

Used for custom keyboard shortcuts/key bindings in mods. The key associated with the custom input can be changed in the options. This means that key_sequence is simply the default key binding.

Inherits from Prototype « PrototypeBase

Properties

key_sequence :: string

The default key sequence for this custom input. [...]

The default key sequence for this custom input. [...]

alternative_key_sequence optional :: string

The alternative key binding for this control. [...]

The alternative key binding for this control. [...]

controller_key_sequence optional :: string

The controller (game pad) keybinding for this control. [...]

The controller (game pad) keybinding for this control. [...]

controller_alternative_key_sequence optional :: string

The alternative controller (game pad) keybinding for this control. [...]

The alternative controller (game pad) keybinding for this control. [...]

linked_game_control optional :: LinkedGameControl

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.

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.

consuming optional :: ConsumingType

Sets whether internal game events associated with the same key sequence should be fired or blocked. [...]

Sets whether internal game events associated with the same key sequence should be fired or blocked. [...]

enabled optional :: bool

If this custom input is enabled. [...]

If this custom input is enabled. [...]

enabled_while_spectating optional :: bool
enabled_while_in_cutscene optional :: bool
include_selected_prototype optional :: bool

If true, the type and name of the currently selected prototype will be provided as "selected_prototype" in the raised Lua event. [...]

If true, the type and name of the currently selected prototype will be provided as "selected_prototype" in the raised Lua event. [...]

item_to_spawn optional :: ItemID

The item will be created when this input is pressed and action is set to "spawn-item". [...]

The item will be created when this input is pressed and action is set to "spawn-item". [...]

action optional :: "lua" or "spawn-item" or "toggle-personal-roboport" or "toggle-personal-logistic-requests" or "toggle-equipment-movement-bonus"

A Lua event is only raised if the action is "lua".

A Lua event is only raised if the action is "lua".

block_modifiersnew optional :: bool

If true, when the shortcut is activated, the modifiers used for this shortcut can't be re-used to press something else until unpressed. [...]

If true, when the shortcut is activated, the modifiers used for this shortcut can't be re-used to press something else until unpressed. [...]

Inherited from Prototype
factoriopedia_alternative optional :: string

The ID type corresponding to the prototype that inherits from this. [...]

The ID type corresponding to the prototype that inherits from this. [...]

Inherited from PrototypeBase
type :: string

Specifies the kind of prototype this is. [...]

Specifies the kind of prototype this is. [...]

name[overridden] :: string

Unique textual identification of the prototype. [...]

Unique textual identification of the prototype. [...]

order optional :: Order

Used to order prototypes in inventory, recipes and GUIs. [...]

Used to order prototypes in inventory, recipes and GUIs. [...]

localised_name optional :: LocalisedString

Overwrites the name set in the locale file. [...]

Overwrites the name set in the locale file. [...]

localised_description optional :: LocalisedString

Overwrites the description set in the locale file. [...]

Overwrites the description set in the locale file. [...]

factoriopedia_descriptionnew optional :: LocalisedString

Provides additional description used in factoriopedia.

Provides additional description used in factoriopedia.

subgroupnew optional :: ItemSubGroupID

The name of an ItemSubGroup.

The name of an ItemSubGroup.

hiddennew optional :: bool
hidden_in_factoriopedianew optional :: bool
parameternew optional :: bool

Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.

Whether the prototype is a special type which can be used to parametrize blueprints and doesn't have other function.

factoriopedia_simulationnew optional :: SimulationDefinition

The simulation shown when looking at this prototype in the Factoriopedia GUI.

The simulation shown when looking at this prototype in the Factoriopedia GUI.

Properties

key_sequence :: string

The default key sequence for this custom input. Use "" (empty string) for unassigned.

Use "mouse-button-2" etc for mouse buttons, mouse-button-3 for middle mouse button. Use "mouse-wheel-up", "mouse-wheel-down", "mouse-wheel-left", "mouse-wheel-right" for mouse wheel.

" + " is used to separate modifier keys from normal keys: "ALT + G".

For modifier keys, the following names are used: "CONTROL", "SHIFT", "ALT", "COMMAND".

A key binding can contain an unlimited amount of modifier keys (listed above) but only one normal key (listed below).

These names are available for the normal keyboard keys
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • K
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • X
  • Y
  • Z
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
  • RETURN
  • ESCAPE
  • BACKSPACE
  • TAB
  • SPACE
  • MINUS
  • EQUALS
  • LEFTBRACKET
  • RIGHTBRACKET
  • BACKSLASH
  • NONUSHASH
  • SEMICOLON
  • APOSTROPHE
  • GRAVE
  • COMMA
  • PERIOD
  • SLASH
  • CAPSLOCK
  • F1
  • F2
  • F3
  • F4
  • F5
  • F6
  • F7
  • F8
  • F9
  • F10
  • F11
  • F12
  • PRINTSCREEN
  • SCROLLLOCK
  • PAUSE
  • INSERT
  • HOME
  • PAGEUP
  • DELETE
  • END
  • PAGEDOWN
  • RIGHT
  • LEFT
  • DOWN
  • UP
  • NUMLOCKCLEAR
  • KP_DIVIDE
  • KP_MULTIPLY
  • KP_MINUS
  • KP_PLUS
  • KP_ENTER
  • KP_1
  • KP_2
  • KP_3
  • KP_4
  • KP_5
  • KP_6
  • KP_7
  • KP_8
  • KP_9
  • KP_0
  • KP_PERIOD
  • NONUSBACKSLASH
  • APPLICATION
  • POWER
  • KP_EQUALS
  • F13
  • F14
  • F15
  • F16
  • F17
  • F18
  • F19
  • F20
  • F21
  • F22
  • F23
  • F24
  • EXECUTE
  • HELP
  • MENU
  • SELECT
  • STOP
  • AGAIN
  • UNDO
  • CUT
  • COPY
  • PASTE
  • FIND
  • MUTE
  • VOLUMEUP
  • VOLUMEDOWN
  • KP_COMMA
  • KP_EQUALSAS400
  • INTERNATIONAL1
  • INTERNATIONAL2
  • INTERNATIONAL3
  • INTERNATIONAL4
  • INTERNATIONAL5
  • INTERNATIONAL6
  • INTERNATIONAL7
  • INTERNATIONAL8
  • INTERNATIONAL9
  • LANG1
  • LANG2
  • LANG3
  • LANG4
  • LANG5
  • LANG6
  • LANG7
  • LANG8
  • LANG9
  • ALTERASE
  • SYSREQ
  • CANCEL
  • CLEAR
  • PRIOR
  • RETURN2
  • SEPARATOR
  • OUT
  • OPER
  • CLEARAGAIN
  • CRSEL
  • EXSEL
  • KP_00
  • KP_000
  • THOUSANDSSEPARATOR
  • DECIMALSEPARATOR
  • CURRENCYUNIT
  • CURRENCYSUBUNIT
  • KP_LEFTPAREN
  • KP_RIGHTPAREN
  • KP_LEFTBRACE
  • KP_RIGHTBRACE
  • KP_TAB
  • KP_BACKSPACE
  • KP_A
  • KP_B
  • KP_C
  • KP_D
  • KP_E
  • KP_F
  • KP_XOR
  • KP_POWER
  • KP_PERCENT
  • KP_LESS
  • KP_GREATER
  • KP_AMPERSAND
  • KP_DBLAMPERSAND
  • KP_VERTICALBAR
  • KP_DBLVERTICALBAR
  • KP_COLON
  • KP_HASH
  • KP_SPACE
  • KP_AT
  • KP_EXCLAM
  • KP_MEMSTORE
  • KP_MEMRECALL
  • KP_MEMCLEAR
  • KP_MEMADD
  • KP_MEMSUBTRACT
  • KP_MEMMULTIPLY
  • KP_MEMDIVIDE
  • KP_PLUSMINUS
  • KP_CLEAR
  • KP_CLEARENTRY
  • KP_BINARY
  • KP_OCTAL
  • KP_DECIMAL
  • KP_HEXADECIMAL
  • LCTRL
  • LSHIFT
  • LALT
  • LGUI
  • RCTRL
  • RSHIFT
  • RALT
  • RGUI
  • MODE
  • AUDIONEXT
  • AUDIOPREV
  • AUDIOSTOP
  • AUDIOPLAY
  • AUDIOMUTE
  • MEDIASELECT
  • WWW
  • MAIL
  • CALCULATOR
  • COMPUTER
  • AC_SEARCH
  • AC_HOME
  • AC_BACK
  • AC_FORWARD
  • AC_STOP
  • AC_REFRESH
  • AC_BOOKMARKS
  • BRIGHTNESSDOWN
  • BRIGHTNESSUP
  • DISPLAYSWITCH
  • KBDILLUMTOGGLE
  • KBDILLUMDOWN
  • KBDILLUMUP
  • EJECT
  • SLEEP
  • APP1
  • APP2
  • AUDIOREWIND
  • AUDIOFASTFORWARD

alternative_key_sequence :: string optional

The alternative key binding for this control. See key_sequence for the format.

controller_key_sequence :: string optional

The controller (game pad) keybinding for this control. Use "" (empty string) for unassigned.

" + " is used to separate modifier buttons from normal buttons: "controller-righttrigger + controller-a".

For modifier buttons, the following names are used: "controller-righttrigger", "controller-lefttrigger".

A key binding can contain an unlimited amount of modifier buttons (listed above) but only one normal button (listed below).

These names are available for the normal controller buttons
  • controller-a
  • controller-b
  • controller-x
  • controller-y
  • controller-back
  • controller-guide
  • controller-start
  • controller-leftstick (pressing left joy stick)
  • controller-left-stick (moving left joy stick)
  • controller-rightstick (pressing right joy stick)
  • controller-right-stick (moving right joy stick)
  • controller-leftshoulder
  • controller-rightshoulder
  • controller-dpup
  • controller-dpdown
  • controller-dpleft
  • controller-dpright
  • controller-misc1
  • controller-paddle1
  • controller-paddle2
  • controller-paddle3
  • controller-paddle4
  • controller-touchpad

controller_alternative_key_sequence :: string optional

The alternative controller (game pad) keybinding for this control. See controller_key_sequence for the format.

linked_game_control :: LinkedGameControl optional

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.

Example

key_sequence = "",
linked_game_control = "clear-cursor"

consuming :: ConsumingType optional

Default: "none"

Sets whether internal game events associated with the same key sequence should be fired or blocked. If they are fired ("none"), then the custom input event will happen before the internal game event.

enabled :: bool optional

Default: true

If this custom input is enabled. Disabled custom inputs exist but are not used by the game. If disabled, no event is raised when the input is used.

enabled_while_spectating :: bool optional

Default: false

enabled_while_in_cutscene :: bool optional

Default: false

include_selected_prototype :: bool optional

Default: false

If true, the type and name of the currently selected prototype will be provided as "selected_prototype" in the raised Lua event. This also works in GUIs, not just the game world.

This will also return an item in the cursor such as copper-wire or rail-planner, if nothing is beneath the cursor.

item_to_spawn :: ItemID optional

The item will be created when this input is pressed and action is set to "spawn-item". The item must have the spawnable flag set.

action :: "lua" or "spawn-item" or "toggle-personal-roboport" or "toggle-personal-logistic-requests" or "toggle-equipment-movement-bonus" optional

Default: "lua"

A Lua event is only raised if the action is "lua".

block_modifiers :: bool optional new

Default: false

If true, when the shortcut is activated, the modifiers used for this shortcut can't be re-used to press something else until unpressed. The example where this is useful is ALT+A to activate spidertron remote, where ALT is consumed, so pressing right mouse button before the ALT is unpressed will not trigger pin creation (ALT + right mouse button), but send the selected unit instead.

Overridden Properties

name :: string

Unique textual identification of the prototype. May only contain alphanumeric characters, dashes and underscores. May not exceed a length of 200 characters.

For a list of all names used in vanilla, see data.raw.

It is also the name for the event that is raised when they key (combination) is pressed and action is "lua", see Tutorial:Script interfaces.

Prototypes

Types

Defines