|
|
(24 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] |
| Prototype type: '''custom-input'''
| |
|
| |
|
| Used for custom keyboard shortcuts/keybindings in mods. The key associated with the custom input can be changed in the options. This means that <code>key_sequence</code> is simply the default keybinding.
| | </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> |
| == Properties ==
| |
| Inherits all properties from [[Prototype]].
| |
| | |
| === name ===
| |
| :''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.
| |
| | |
| * "mouse-button-2" etc for mouse buttons
| |
| * "mouse-wheel-up", "mouse-wheel-down", "mouse-wheel-left", "mouse-wheel-right" for mouse wheel (mouse wheel controls do not work for custom inputs!)
| |
| * " + " is used to separate modifier keys from normal keys: <code>"ALT + G"</code>
| |
| * For modifier keys, the following names are used: "CONTROL", "SHIFT", "ALT", "COMMAND"
| |
| * A keybinding can contain an unlimited amount of modifier keys (listed above) but only one normal key (listed below).
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed" style="width: 40em;">
| |
| These names are available for the normal keys
| |
| <pre class="mw-collapsible-content">
| |
| 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
| |
| </pre>
| |
| </div>
| |
| | |
| === 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]
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed" style="width: 40em;">
| |
| List of internal names of game controls
| |
| <pre class="mw-collapsible-content">
| |
| alt-zoom-in
| |
| alt-zoom-out
| |
| build
| |
| build-ghost
| |
| cancel-craft
| |
| cancel-craft-5
| |
| cancel-craft-all
| |
| change-active-quickbar
| |
| clean-cursor
| |
| close-gui
| |
| confirm-message
| |
| connect-train
| |
| copy-entity-settings
| |
| craft
| |
| craft-5
| |
| craft-all
| |
| cursor-split
| |
| cycle-blueprint-backwards
| |
| cycle-blueprint-forwards
| |
| debug-reset-zoom
| |
| debug-toggle-atlas-gui
| |
| debug-toggle-autoplace-gui
| |
| debug-toggle-basic
| |
| debug-toggle-debug-settings
| |
| debug-toggle-detailed
| |
| debug-toggle-full
| |
| disconnect-train
| |
| drag-map
| |
| drop-cursor
| |
| editor-edit-entity-details
| |
| editor-remove-entity
| |
| editor-show-all-difficulties
| |
| editor-show-easy-difficulty
| |
| editor-show-hard-difficulty
| |
| editor-show-normal-difficulty
| |
| editor-tool-primary-action
| |
| editor-tool-secondary-action
| |
| fast-entity-split
| |
| fast-entity-transfer
| |
| focus-search
| |
| inventory-split
| |
| inventory-transfer
| |
| kill-statistics
| |
| larger-terrain-building-area
| |
| logistic-networks
| |
| mine
| |
| mouse-button-1
| |
| mouse-button-2
| |
| mouse-button-3
| |
| mouse-button-n
| |
| mouse-wheel-down
| |
| mouse-wheel-left
| |
| mouse-wheel-right
| |
| mouse-wheel-up
| |
| move-down
| |
| move-left
| |
| move-right
| |
| move-up
| |
| next-weapon
| |
| open-character-gui
| |
| open-gui
| |
| open-item
| |
| open-technology-gui
| |
| paste-entity-settings
| |
| pause-game
| |
| pick-item
| |
| pick-items
| |
| place-tag
| |
| previous-technology
| |
| production-statistics
| |
| quickbar-1
| |
| quickbar-10
| |
| quickbar-2
| |
| quickbar-3
| |
| quickbar-4
| |
| quickbar-5
| |
| quickbar-6
| |
| quickbar-7
| |
| quickbar-8
| |
| quickbar-9
| |
| remove-pole-cables
| |
| reverse-rotate
| |
| rotate
| |
| select-for-blueprint
| |
| select-for-cancel-deconstruct
| |
| shoot-enemy
| |
| shoot-selected
| |
| show-info
| |
| smaller-terrain-building-area
| |
| smart-pipette
| |
| stack-split
| |
| stack-transfer
| |
| toggle-blueprint-library
| |
| toggle-console
| |
| toggle-driving
| |
| toggle-filter
| |
| toggle-gui-debug
| |
| toggle-map
| |
| toggle-menu
| |
| toggle-tips-and-tricks
| |
| zoom-in
| |
| zoom-out
| |
| </pre></div> | |
| | |
| Example to use the same key sequence as the clean-cursor hotkey:
| |
| <syntaxhighlight lang="lua">key_sequence = ""
| |
| linked_game_control = "clean-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.
| |
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.