ShiftLock on XBox using default 'MouseLockController'

I have edited the default ‘MouseLockController’ inside player module to add the X key as seen below:

self.boundKeys = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift, Enum.KeyCode.ButtonX}

This seems to work just fine when I am on PC using a controller, but does not work when I am on XBox. Does anyone have any ideas as to why this works with PC/Controller but not XBox/Controller? I suspect it has something to do with:

local userHasMouseLockModeEnabled = GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch

this line returning false for users on XBox maybe?

1 Like

I cant possibly thank you enough! I’ve been trying to find the reason why its been happening to me and you’re absolutely right

local userHasMouseLockModeEnabled = GameSettings.ControlMode == Enum.ControlMode.MouseLockSwitch

Is indeed returning false for xbox users
Thank you so much!