Unfortunately it’s not currently possible with the Scripting API, though I have requested this before: Feature Request: add Camera.mouseLocked to the public API
Unfortunately it’s not currently possible with the Scripting API, though I have requested this before: Feature Request: add Camera.mouseLocked to the public API