Skip to content

Implement cursor grabbing on web using Pointer Lock API #1674

@alvinhochun

Description

@alvinhochun

Pointer Lock API

This locks the mouse cursor at a specific position and hides it so that relative mouse movements can be captured without the cursor ever leaving the element or getting stuck on the screen edge. It does not just limit movement within the canvas area like it does on Windows, however the docs indicates that this behaviour is also the same for macOS and Wayland (minus the automatic hiding of cursor) so I believe this will fit nicely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - webAffects the Web backend (WebAssembly/WASM)S - platform parityUnintended platform differences

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions