[uievents] Expose 'direction-inversion' in wheel events (#57)

Split from https://github.com/w3c/uievents/issues/56

Current DOM 'wheel' events only expose bare-minimum data (deltaX, deltaY) that don't fully capture how modern scrollwheels and trackpads behave. Exposing additional bits of information would greatly improve the possibilities for interesting and important custom event handling.

Users may "invert" the direction of scrolling (conceptually the "page" moving in the same direction as their fingers vs. the "scrollbar" moving in the same direction as their fingers). Unfortunately this setting is not exposed to developers, and it would be useful to know whether given scroll deltas mirrored the users real-world finger motion.

Native APIs expose this information, and it would be extremely useful to have access to it in the browser in cases where scrolling gestures are interpreted as something other than 2D scrolling, (3D navigation for example).

I propose exposing an additional property on delivered DOM wheel events:

    interface WheelEvent : MouseEvent {
    ...
    +    readonly    attribute boolean       directionInvertedFromDevice;
    };

    directionInvertedFromDevice of type boolean, readonly
      true if the signs of deltaX and deltaY are reverse the user's physical scrolling direction
      false otherwise


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/57

Received on Thursday, 12 November 2015 15:46:36 UTC