Skip to content

[Feature request] raw mouse input, no acceleration, with requestPointerLock({ unadjustedMovement: true }) #24602

Open
@WofWca

Description

@WofWca

Version of emscripten/emsdk:
3.1.58

This affects shooter games especially. Chromium introduced the unadjustedMovement parameter not so long ago, which makes aiming so so much better, indistinguishable from running a native game.

There is an example of an app, Quake III Arena, that utilizes Emscripten with a hack to get it to use unadjustedMovement:

https://github.com/jdarpinian/ioq3/blob/7801abd5ac510a889087ad62473c54dbe509e106/code/web/index.html#L301-L322

It can be tested here: https://thelongestyard.link/

However, I believe that this should be upstreamed to Emscripten itself. Perhaps with a config option, if needed.

As of 2025-06 it's only supported on Windows and macOS, however, and its support needs to be detected, perhaps with try { await canvas.requestPointerLock({ unadjustedMovement: true }) catch ....
Also note that this parameter is considered experimental.

I wanted to try to make an MR, but I am not sure where exactly this needs to be changed (there is a lot of requestPointerLock references), and how to handle the fact that this option might not be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions