Skip to main content

CmdrClient

This item only works when running on the client. Client

The Cmdr client singleton and entry point.

Properties

Registry

This item is read only and cannot be modified. Read Only
CmdrClient.Registry: Registry

Refers to the current command Registry.

Dispatcher

This item is read only and cannot be modified. Read Only
CmdrClient.Dispatcher: Dispatcher

Refers to the current command Dispatcher.

Util

This item is read only and cannot be modified. Read Only
CmdrClient.Util: Util

Refers to a table containing many useful utility functions.

Enabled

This item is read only and cannot be modified. Read Only
CmdrClient.Enabled: boolean

Whether or not Cmdr is enabled (will show via the defined activation keys). Use CmdrClient:SetEnabled to change.

PlaceName

This item is read only and cannot be modified. Read Only
CmdrClient.PlaceName: string

The current place name, displayed on the interface. Use CmdrClient:SetPlaceName to change.

ActivationKeys

This item is read only and cannot be modified. Read Only
CmdrClient.ActivationKeys: {[Enum.KeyCode]=true}

The list of key codes that will show or hide Cmdr. Use CmdrClient:SetActivationKeys to change.

Functions

SetActivationKeys

CmdrClient:SetActivationKeys(keys{Enum.KeyCode}) → ()

Sets the key codes that will used to show or hide Cmdr.

SetPlaceName

CmdrClient:SetPlaceName(namestring) → ()

Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.

SetEnabled

CmdrClient:SetEnabled(enabledboolean) → ()

Sets whether or not Cmdr can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.

SetActivationUnlocksMouse

CmdrClient:SetActivationUnlocksMouse(enabledboolean) → ()

Sets if activation will free the mouse.

Show

CmdrClient:Show() → ()

Shows the Cmdr window. Does nothing if Cmdr isn't enabled.

Hide

CmdrClient:Hide() → ()

Hides the Cmdr window.

Toggle

CmdrClient:Toggle() → ()

Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.

SetMashToEnable

CmdrClient:SetMashToEnable(enabledboolean) → ()

Enables the "Mash to open" feature. This feature, when enabled, requires the activation key to be pressed 5 times within a second to enable Cmdr. This may be helpful to guard against mispresses from opening the window, for example.

SetHideOnLostFocus

CmdrClient:SetHideOnLostFocus(enabledboolean) → ()

Sets the hide on 'lost focus' feature. This feature, which is enabled by default, will cause Cmdr to hide when the user clicks off the window.

HandleEvent

CmdrClient:HandleEvent(
namestring,
callback(...any) → ()
) → ()

Sets the network event handler for a certain event type.

Show raw api
{
    "functions": [
        {
            "name": "SetActivationKeys",
            "desc": "Sets the key codes that will used to show or hide Cmdr.",
            "params": [
                {
                    "name": "keys",
                    "desc": "",
                    "lua_type": "{ Enum.KeyCode }"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 104,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "SetPlaceName",
            "desc": "Sets the place name label on the interface. This is useful for a quick way to tell what game you're playing in a universe game.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 113,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "SetEnabled",
            "desc": "Sets whether or not Cmdr can be shown via the defined activation keys. Useful for when you want users to opt-in to show the console, for instance in a settings menu.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 123,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "SetActivationUnlocksMouse",
            "desc": "Sets if activation will free the mouse.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 132,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Show",
            "desc": "Shows the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 141,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Hide",
            "desc": "Hides the Cmdr window.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 154,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Toggle",
            "desc": "Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 163,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "SetMashToEnable",
            "desc": "Enables the \"Mash to open\" feature.\nThis feature, when enabled, requires the activation key to be pressed 5 times within a second to [enable](#SetEnabled) Cmdr.\nThis may be helpful to guard against mispresses from opening the window, for example.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 179,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "SetHideOnLostFocus",
            "desc": "Sets the hide on 'lost focus' feature.\nThis feature, which is enabled by default, will cause Cmdr to [hide](#Hide) when the user clicks off the window.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 193,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "HandleEvent",
            "desc": "Sets the [network event handler](/docs/networkeventhandlers) for a certain event type.",
            "params": [
                {
                    "name": "name",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "callback",
                    "desc": "",
                    "lua_type": "(...any) -> ()"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 202,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Registry",
            "desc": "Refers to the current command Registry.",
            "lua_type": "Registry",
            "readonly": true,
            "source": {
                "line": 26,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Dispatcher",
            "desc": "Refers to the current command Dispatcher.",
            "lua_type": "Dispatcher",
            "readonly": true,
            "source": {
                "line": 33,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Util",
            "desc": "Refers to a table containing many useful utility functions.",
            "lua_type": "Util",
            "readonly": true,
            "source": {
                "line": 40,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "Enabled",
            "desc": "Whether or not Cmdr is enabled (will show via the defined activation keys). Use [`CmdrClient:SetEnabled`](#SetEnabled) to change.",
            "lua_type": "boolean",
            "readonly": true,
            "source": {
                "line": 47,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "PlaceName",
            "desc": "The current place name, displayed on the interface. Use [`CmdrClient:SetPlaceName`](#SetPlaceName) to change.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 54,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        },
        {
            "name": "ActivationKeys",
            "desc": "The list of key codes that will show or hide Cmdr. Use [`CmdrClient:SetActivationKeys`](#SetActivationKeys) to change.",
            "lua_type": "{ [Enum.KeyCode] = true }",
            "readonly": true,
            "source": {
                "line": 61,
                "path": "Cmdr/CmdrClient/init.lua"
            }
        }
    ],
    "types": [],
    "name": "CmdrClient",
    "desc": "The Cmdr client singleton and entry point.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 19,
        "path": "Cmdr/CmdrClient/init.lua"
    }
}