Skip to main content

InputKeyMap

This represents a list of key bindings for a specific mode. While this is a useful object to query for showing icons and input hints to the user, in general, it is recommended that binding occur at the list level instead of at the input mode level. That way, if the user switches to another input mode then input is immediately processed.

Functions

new

InputKeyMap.new(
inputModeTypeInputModeType,
inputTypes{InputType}
) → InputKeyMap

Constructs a new InputKeyMap. Generally this would be sent immediately to an InputKeyMapList. This holds a list of key bindings for a specific type.

GetInputModeType

InputKeyMap:GetInputModeType() → ()

Gets the input mode for this keymap. This will not change.

SetInputTypesList

InputKeyMap:SetInputTypesList(inputTypes{InputType}) → ()

Sets the input types list for this input key map.

SetDefaultInputTypesList

InputKeyMap:SetDefaultInputTypesList(inputTypes{InputType}) → ()

Sets the default input types list. This is whatever the game has, which is different than whatever the user has set.

This will also set the current input type to be the same as the default if they are equivalent.

GetDefaultInputTypesList

InputKeyMap:GetDefaultInputTypesList() → {InputType}

Gets the default input types list

RestoreDefault

InputKeyMap:RestoreDefault() → ()

Resets the input type to the default input types.

ObserveInputTypesList

InputKeyMap:ObserveInputTypesList() → Observable<{InputType}>

Observes the current list for the input key map list.

GetInputTypesList

InputKeyMap:GetInputTypesList() → {InputType}

Gets the input types list

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new InputKeyMap. Generally this would be sent immediately to an\n[InputKeyMapList]. This holds a list of key bindings for a specific type.",
            "params": [
                {
                    "name": "inputModeType",
                    "desc": "",
                    "lua_type": "InputModeType"
                },
                {
                    "name": "inputTypes",
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "InputKeyMap"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 29,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "GetInputModeType",
            "desc": "Gets the input mode for this keymap. This will not change.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 48,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "SetInputTypesList",
            "desc": "Sets the input types list for this input key map.",
            "params": [
                {
                    "name": "inputTypes",
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 57,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "SetDefaultInputTypesList",
            "desc": "Sets the default input types list. This is whatever the game has, which is\ndifferent than whatever the user has set.\n\nThis will also set the current input type to be the same as the default if they\nare equivalent.",
            "params": [
                {
                    "name": "inputTypes",
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 72,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "GetDefaultInputTypesList",
            "desc": "Gets the default input types list",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 88,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "RestoreDefault",
            "desc": "Resets the input type to the default input types.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 95,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "ObserveInputTypesList",
            "desc": "Observes the current list for the input key map list.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<{ InputType }>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 104,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        },
        {
            "name": "GetInputTypesList",
            "desc": "Gets the input types list",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ InputType }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 113,
                "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "InputKeyMap",
    "desc": "This represents a list of key bindings for a specific mode. While this is a useful object to query\nfor showing icons and input hints to the user, in general, it is recommended that binding occur\nat the list level instead of at the input mode level. That way, if the user switches to another input\nmode then input is immediately processed.",
    "source": {
        "line": 9,
        "path": "src/inputkeymaputils/src/Shared/InputKeyMap.lua"
    }
}