Skip to main content

MouseShiftLockService

Utility service to enable or disable mouse shift lock on the fly on Roblox.

See: https://devforum.roblox.com/t/custom-center-locked-mouse-camera-control-toggle/205323

local mouseShiftLockService = serviceBag:GetService(MouseShiftLockService)
mouseShiftLockService:DisableShiftLock()

Functions

Init

MouseShiftLockService:Init() → ()

Initializes the mouse shift lock service. Should be done via ServiceBag.

EnableShiftLock

MouseShiftLockService:EnableShiftLock() → ()

Enables mouse shift lock

DisableShiftLock

MouseShiftLockService:DisableShiftLock() → ()

Disables mouse shift lock

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the mouse shift lock service. Should be done via [ServiceBag].",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 28,
                "path": "src/mouseshiftlockservice/src/Client/MouseShiftLockService.lua"
            }
        },
        {
            "name": "EnableShiftLock",
            "desc": "Enables mouse shift lock",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 82,
                "path": "src/mouseshiftlockservice/src/Client/MouseShiftLockService.lua"
            }
        },
        {
            "name": "DisableShiftLock",
            "desc": "Disables mouse shift lock",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 92,
                "path": "src/mouseshiftlockservice/src/Client/MouseShiftLockService.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "MouseShiftLockService",
    "desc": "Utility service to enable or disable mouse shift lock on the fly on Roblox.\n\nSee: https://devforum.roblox.com/t/custom-center-locked-mouse-camera-control-toggle/205323\n\n```lua\nlocal mouseShiftLockService = serviceBag:GetService(MouseShiftLockService)\nmouseShiftLockService:DisableShiftLock()\n```",
    "source": {
        "line": 13,
        "path": "src/mouseshiftlockservice/src/Client/MouseShiftLockService.lua"
    }
}