Definition for a shortcut button in the shortcut bar.
This is **not** a custom keybinding (keyboard shortcut), for that see CustomInputPrototype.
Prototype"toggle-alt-mode" | "undo" | "redo" | "paste" | "import-string" | "toggle-personal-roboport" | "toggle-personal-logistic-requests" | "toggle-equipment-movement-bonus" | "spawn-item" | "lua"falsefalseIf this is "lua", on_lua_shortcut is raised when the shortcut is clicked.
Array<IconData>truefalseCan't be an empty array.
FileNametruefalsePath to the icon file.
Only loaded, and mandatory if icons is not defined.
SpriteSizeTypetruefalseThe size of the square icon, in pixels. E.g. 32 for a 32px by 32px icon. Must be larger than 0.
The base game uses 32px icons for shortcuts.
Only loaded if icons is not defined.
Array<IconData>truefalseCan't be an empty array.
FileNametruefalsePath to the icon file. Used in the shortcut selection popup.
Only loaded, and mandatory if small_icons is not defined.
SpriteSizeTypetruefalseThe size of the small icon, in pixels. E.g. 32 for a 32px by 32px icon. Must be larger than 0.
The base game uses 24px small icons for shortcuts.
Only loaded if small_icons is not defined.
ItemIDtruefalseThe item to create when clicking on a shortcut with the action set to "spawn-item". The item must have the spawnable flag set.
TechnologyIDtruefalseThe technology that must be researched before this shortcut can be used. Once a shortcut is unlocked in one save file, it is unlocked for all future save files.
booleantruefalseIf true, the shortcut will not be available until its technology_to_unlock is researched, even if it was already researched in a different game.
booleantruefalseMust be enabled for the Factorio API to be able to set the toggled state on the shortcut button, see LuaPlayer::set_shortcut_toggled.
stringtruefalseName of a custom input or vanilla control. This is **only** used to show the keybind in the tooltip of the shortcut.
"default" | "blue" | "red" | "green"truefalseOrdertruetrueUsed to order the shortcuts in the quick panel, which replaces the shortcut bar when using a controller (game pad). It is recommended to order modded shortcuts after the vanilla shortcuts.