Thank you Ian for the clear use case write up (and to Artillery for
progress on a great product), Florian Brandon and Glenn for discussion &
contributions.
As Florian mentioned, we did discuss this use case in 2011 and at that time
I attempted to summarize the situation in the pointer lock spec FAQ [1].
Please do read that discussion of the related 3 topics of clipping, motion
while clipped, and raw data.
One way to move forward on those topics is to prototype functional
solutions on Windows, Mac, and Linux and illuminate a practical solution
that browsers may adopt. I did an investigation in 2011 and did not find a
solution. For clipping only I believe Mac was the only platform I didn't
find a solution for. Windows has ClipCursor() and Linux has XGrabPointer().
Once we know we can implement the functionality, we can discuss how to
express this in an API.
[1]
https://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#why-bundle-all-functionality-hiding-cursor-providing-mouse-deltas-instead-of-using-css-to-hide-the-cursor-always-providing-delta-values-and-offering-an-api-to-restrict-the-cursor-movement-to-a-portion-of-the-web-page