Skip to main content

InputModeType

Type specification for input modes, which is static. Separated out from InputMode which is dynamic.

Functions

new

InputModeType.new(
namestring,
typesAndInputModes{{UserInputType | KeyCode | string | InputMode}}
) → InputMode

Constructs a new InputModeType

isInputModeType

InputModeType.isInputModeType(valueany) → boolean

Returns true if a given value is an InputModeType

IsValid

InputModeType:IsValid(inputType{UserInputType | KeyCode | string}) → boolean

Checks the validity of the inputType

GetKeys

InputModeType:GetKeys() → {UserInputType | KeyCode | string}

Returns all keys defining the input mode.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new InputModeType",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "typesAndInputModes",
                    "desc": "",
                    "lua_type": "{ { UserInputType | KeyCode | string | InputMode } }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "InputMode"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/inputmode/src/Shared/InputModeType.lua"
            }
        },
        {
            "name": "isInputModeType",
            "desc": "Returns true if a given value is an InputModeType",
            "params": [
                {
                    "name": "value",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 39,
                "path": "src/inputmode/src/Shared/InputModeType.lua"
            }
        },
        {
            "name": "IsValid",
            "desc": "Checks the validity of the inputType",
            "params": [
                {
                    "name": "inputType",
                    "desc": "",
                    "lua_type": "{ UserInputType | KeyCode | string }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 48,
                "path": "src/inputmode/src/Shared/InputModeType.lua"
            }
        },
        {
            "name": "GetKeys",
            "desc": "Returns all keys defining the input mode.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ UserInputType | KeyCode | string }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 58,
                "path": "src/inputmode/src/Shared/InputModeType.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "InputModeType",
    "desc": "Type specification for input modes, which is static. Separated out from InputMode which is dynamic.",
    "source": {
        "line": 6,
        "path": "src/inputmode/src/Shared/InputModeType.lua"
    }
}