Skip to main content

Input

The input interface

Functions

button

Input.button(
idstring--

button name identifier

) → InputRef--

button input instance

Gets a button by id

Buttons

Name Description
Up Up direction
Down Down direction
Left Left direction
Right Right direction
Dash Dash ability
Special Special ability
Aim Aim button
Kick Red attack
Snare Yellow attack
Status Status information
Map Map overview
Menu Pause menu
Coin Arcade coin insertion
Service Arcade service mode
MenuUp Menu up direction
MenuDown Menu down direction
MenuLeft Menu left direction
MenuRight Menu right direction
MenuPrimary Menu select
MenuSecondary Menu alternative select
MenuBack Menu backwards
AnyKey Virtual any key

analog

Input.analog(
idstring--

analog name identifier

) → InputRef--

analog input instance

Gets a analog by id

Analogs

Name
TargetX
TargetY
MoveX
MoveY
Show raw api
{
    "functions": [
        {
            "name": "button",
            "desc": "Gets a button by id\n\n### Buttons\n| Name           | Description              |\n|----------------|--------------------------|\n| Up             | Up direction             |\n| Down           | Down direction           |\n| Left           | Left direction           |\n| Right          | Right direction          |\n| Dash           | Dash ability             |\n| Special        | Special ability          |\n| Aim            | Aim button               |\n| Kick           | Red attack               |\n| Snare          | Yellow attack            |\n| Status         | Status information       |\n| Map            | Map overview             |\n| Menu           | Pause menu               |\n| Coin           | Arcade coin insertion    |\n| Service        | Arcade service mode      |\n| MenuUp         | Menu up direction        |\n| MenuDown       | Menu down direction      |\n| MenuLeft       | Menu left direction      |\n| MenuRight      | Menu right direction     |\n| MenuPrimary    | Menu select              |\n| MenuSecondary  | Menu alternative select  |\n| MenuBack       | Menu backwards           |\n| AnyKey         | Virtual any key          |",
            "params": [
                {
                    "name": "id",
                    "desc": "button name identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "button input instance",
                    "lua_type": "InputRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 39,
                "path": "../../res/data/script/lib/system/input.lua"
            }
        },
        {
            "name": "analog",
            "desc": "Gets a analog by id\n\n### Analogs\n| Name           |\n|----------------|\n| TargetX        |\n| TargetY        |\n| MoveX          |\n| MoveY          |",
            "params": [
                {
                    "name": "id",
                    "desc": "analog name identifier",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "analog input instance",
                    "lua_type": "InputRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 57,
                "path": "../../res/data/script/lib/system/input.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Input",
    "desc": "The input interface",
    "source": {
        "line": 5,
        "path": "../../res/data/script/lib/system/input.lua"
    }
}