Skip to content
Desktop inputOverviewNew · 0.744

lockwindow

Describe confining the cursor to the active window area.

Details#

Attempts to focus the target window and confine the cursor to its rectangle. Returns false if no window is found, otherwise true. Call unlockwindow to release cursor confinement.

Examples#

Example

Luau
if lockwindow() then
    print(iswindowlocked())
    unlockwindow()
end