Skip to main content

InputTypeUtils

Types

InputType

type InputType = KeyCode | UserInputType | SlottedTouchButton | "TouchButton" | "Tap" | "Drag" | any

A valid input type that can be represented here.

Functions

isTapInWorld

InputTypeUtils.isTapInWorld(inputKeyany) → boolean

Returns true if the input type is specifying a tap in the world

isDrag

InputTypeUtils.isDrag(inputKeyany) → boolean

Returns true if the input type is specifying a drag

isRobloxTouchButton

InputTypeUtils.isRobloxTouchButton(inputKeyany) → boolean

Returns true if the input type is specifying a Roblox touch button

createTapInWorld

InputTypeUtils.createTapInWorld() → "Tap"

Specifies a tap in the world

createRobloxTouchButton

InputTypeUtils.createRobloxTouchButton() → "Tap"

Specifies a roblox touch button

getUniqueKeyForInputType

InputTypeUtils.getUniqueKeyForInputType(inputTypeInputType) → any

Computes a unique id for an inputType which can be used in a set to deduplicate/compare the objects. Used to know when to exclude different types from each other.

areInputTypesListsEquivalent

InputTypeUtils.areInputTypesListsEquivalent(
a{InputType},
b{InputType}
) → boolean

Expensive comparison check to see if InputTypes are the same or not.

Show raw api
{
    "functions": [
        {
            "name": "isTapInWorld",
            "desc": "Returns true if the input type is specifying a tap in the world",
            "params": [
                {
                    "name": "inputKey",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 35,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "isDrag",
            "desc": "Returns true if the input type is specifying a drag",
            "params": [
                {
                    "name": "inputKey",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "isRobloxTouchButton",
            "desc": "Returns true if the input type is specifying a Roblox touch button",
            "params": [
                {
                    "name": "inputKey",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 54,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "createTapInWorld",
            "desc": "Specifies a tap in the world",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"Tap\""
                }
            ],
            "function_type": "static",
            "source": {
                "line": 62,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "createRobloxTouchButton",
            "desc": "Specifies a roblox touch button",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "\"Tap\""
                }
            ],
            "function_type": "static",
            "source": {
                "line": 70,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "getUniqueKeyForInputType",
            "desc": "Computes a unique id for an inputType which can be used\nin a set to deduplicate/compare the objects. Used to know\nwhen to exclude different types from each other.",
            "params": [
                {
                    "name": "inputType",
                    "desc": "",
                    "lua_type": "InputType"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 82,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        },
        {
            "name": "areInputTypesListsEquivalent",
            "desc": "Expensive comparison check to see if InputTypes are the same or not.",
            "params": [
                {
                    "name": "a",
                    "desc": "",
                    "lua_type": "{ InputType }"
                },
                {
                    "name": "b",
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 109,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "InputType",
            "desc": "A valid input type that can be represented here.",
            "lua_type": "KeyCode | UserInputType | SlottedTouchButton | \"TouchButton\" | \"Tap\" | \"Drag\" | any",
            "source": {
                "line": 19,
                "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
            }
        }
    ],
    "name": "InputTypeUtils",
    "desc": "",
    "source": {
        "line": 4,
        "path": "src/inputkeymaputils/src/Shared/Types/InputTypeUtils.lua"
    }
}