Skip to main content

InputChordUtils

Standardized data type to define an input chord, such as Ctrl+Z.

Types​

ModifierInputChord​

type ModifierInputChord = {
type: "ModifierInputChord",
modifiers: {Enum.KeyCode},
keyCode: Enum.KeyCode
}

A modifier input chord data type that separates keyCode from modifier keys.

Functions​

isModifierInputChord​

InputChordUtils.isModifierInputChord(data: any) → boolean

Checks

createModifierInputChord​

InputChordUtils.createModifierInputChord(
modifiers: {KeyCode},
keyCode: KeyCode
) → ModifierInputChord

Creates a modifier input chord. This chord specifically separates the order such that the event only triggers when the keyCode is pressed, but also requires the modifier key to be down at the trigger point.

This mirrors the existing modifier standards for Windows.

Show raw api
{
    "functions": [
        {
            "name": "isModifierInputChord",
            "desc": "Checks",
            "params": [
                {
                    "name": "data",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 31,
                "path": "src/inputkeymaputils/src/Shared/Types/InputChordUtils.lua"
            }
        },
        {
            "name": "createModifierInputChord",
            "desc": "Creates a modifier input chord. This chord specifically separates the\norder such that the event only triggers when the keyCode is pressed, but\nalso requires the modifier key to be down at the trigger point.\n\nThis mirrors the existing modifier standards for Windows.",
            "params": [
                {
                    "name": "modifiers",
                    "desc": "",
                    "lua_type": "{ KeyCode }"
                },
                {
                    "name": "keyCode",
                    "desc": "",
                    "lua_type": "KeyCode"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ModifierInputChord"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 49,
                "path": "src/inputkeymaputils/src/Shared/Types/InputChordUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "ModifierInputChord",
            "desc": "A modifier input chord data type that separates keyCode from modifier keys.",
            "lua_type": "{ type: \"ModifierInputChord\", modifiers: { Enum.KeyCode }, keyCode: Enum.KeyCode }",
            "source": {
                "line": 18,
                "path": "src/inputkeymaputils/src/Shared/Types/InputChordUtils.lua"
            }
        }
    ],
    "name": "InputChordUtils",
    "desc": "Standardized data type to define an input chord, such as Ctrl+Z.",
    "source": {
        "line": 7,
        "path": "src/inputkeymaputils/src/Shared/Types/InputChordUtils.lua"
    }
}