The 'component' version (separate orthogonal features for mouse deltas,
constraining movement of mouse, and hiding cursor) seems preferable to the
'composite' api as currently drafted. That is, if implementable and
specifiable. We need to answer a few questions (I'll research this, but if
anyone already has pointers/answers to the information it will accelerate
the process):
Can the mouse be constrained on all platforms? If so, can it be constrained
to arbitrary rectangles or only a window (this is a nice to have, would be
good to have web apps able to confine the mouse to only a region of a
page).
- Windows: ClipCursor provides this. Does it work over remote desktop (just
a nice to have? warping may not either)?
- Linux: XGrabPointer can constrain to a window's area (is there a way to
specify arbitrary rects?)
- Mac: ?
What are the units of .movementX/Y if we're reading 'raw' input device
coordinates? Are they consistent across devices and platforms? Can we
specify them? If not, I'm hesitate to cause web application developers to
deal with calibrating to arbitrary and unknown units for .movementX/Y.
- Windows WM_INPUT does not include ballistics (mouse acceleration), and
that's OK/arguably preferable. But what are the units? Using
the WM_MOUSEMOVE data and warping the cursor position allows us to specify
precisely what the units are of .movementX/Y, in current spec draft, "The
members movementX and movementY must provide the change in position of the
mouse, as if the values of e.g. clientX were stored between two subsequent
mousemove events e1 and e2 and the difference taken e2.clientX-e1.clientX."