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.

Gui

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

Refers to the current Cmdr GUI.

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.

SetMashToOpen

CmdrClient:SetMashToOpen(enabledboolean) → ()

Enables the "Mash to open" feature. This feature, when enabled, requires the activation key to be pressed 5 times within a second to open Cmdr. This may be helpful to guard against mispresses from opening the window, for example. Once opened, mashing will be disabled for 10 seconds since it was last closed for convenience.

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.

SetMashToEnable

deprecated in v1.13.0
</>
This was deprecated in v1.13.0
This method was renamed to SetMashToOpen in v1.13.0. The old name exists for backwards compatibility and should not be used for new work.
CmdrClient:SetMashToEnable(enabledboolean) → ()
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": 138,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 147,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 157,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetActivationUnlocksMouse",
            "desc": "Sets if activation will free the mouse.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 166,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Show",
            "desc": "Shows the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 175,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Hide",
            "desc": "Hides the Cmdr window.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 188,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Toggle",
            "desc": "Toggles the Cmdr window. Does nothing if Cmdr isn't enabled.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 197,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetMashToOpen",
            "desc": "Enables the \"Mash to open\" feature.\nThis feature, when enabled, requires the [activation key](#SetActivationKeys) to be pressed 5 times within a second to open Cmdr.\nThis may be helpful to guard against mispresses from opening the window, for example.\nOnce opened, mashing will be disabled for 10 seconds since it was last closed for convenience.",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 214,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "SetMashToEnable",
            "desc": "",
            "params": [
                {
                    "name": "enabled",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "deprecated": {
                "version": "v1.13.0",
                "desc": "This method was renamed to SetMashToOpen in v1.13.0. The old name exists for backwards compatibility and should not be used for new work."
            },
            "source": {
                "line": 222,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 238,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 247,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Registry",
            "desc": "Refers to the current command Registry.",
            "lua_type": "Registry",
            "readonly": true,
            "source": {
                "line": 39,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Dispatcher",
            "desc": "Refers to the current command Dispatcher.",
            "lua_type": "Dispatcher",
            "readonly": true,
            "source": {
                "line": 46,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Util",
            "desc": "Refers to a table containing many useful utility functions.",
            "lua_type": "Util",
            "readonly": true,
            "source": {
                "line": 53,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 60,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "MashToOpen",
            "desc": "Whether or not MashToOpen is enabled. Use [`CmdrClient:SetMashToOpen`](#SetMashToOpen) to change.",
            "lua_type": "boolean",
            "private": true,
            "readonly": true,
            "source": {
                "line": 68,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "PlaceName",
            "desc": "The current place name, displayed on the interface. Use [`CmdrClient:SetPlaceName`](#SetPlaceName) to change.",
            "lua_type": "string",
            "readonly": true,
            "source": {
                "line": 75,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "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": 82,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Gui",
            "desc": "Refers to the current Cmdr GUI.",
            "lua_type": "ScreenGui",
            "readonly": true,
            "source": {
                "line": 89,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        },
        {
            "name": "Toggled",
            "desc": "A signal that fires when the Cmdr window is toggled.",
            "lua_type": "{ Connect: (self: ToggleSignal, callback: (visible: boolean) -> ()) -> RBXScriptConnection, Fire: (self: ToggleSignal, visible: boolean) -> () }",
            "private": true,
            "readonly": true,
            "source": {
                "line": 97,
                "path": "Cmdr/CmdrClient/init.luau"
            }
        }
    ],
    "types": [],
    "name": "CmdrClient",
    "desc": "The Cmdr client singleton and entry point.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 32,
        "path": "Cmdr/CmdrClient/init.luau"
    }
}