W3C home > Mailing lists > Public > public-webevents@w3.org > July to September 2011

Re: Indirect touch events?

From: Matt Brubeck <mbrubeck@mozilla.com>
Date: Wed, 17 Aug 2011 07:17:00 -0700
Message-ID: <4E4BCD5C.70801@mozilla.com>
To: Nathan Vander Wilt <nate-lists@calftrail.com>
CC: public-webevents@w3.org
On 08/16/2011 11:07 AM, Nathan Vander Wilt wrote:
> What is the plan for addressing indirect touch events  i.e. those that are not received relative to screen/client coordinates, but relative to the input device itself?

We haven't really discussed this yet.  Thanks for bringing it up.

> At a low-level, it's just a matter of giving JavaScript touch events with deviceX/deviceY properties, preferably normalized to the [0-1] range, as well as the same gesture info as direct manipulation. But at the spec level, there needs to be some way of handling and communicating this distinction.

Yes, I see.  Can you sketch out a couple of use cases to illustrate what 
developers might do with these events?  And can you point us to 
documentation for similar APIs in Mac OS X or elsewhere?

Some tricky parts:  There's no natural mapping from these device 
coordinates to targets in a web page.  Touches on a touch pad have 
default actions like mouse movement and scrolling that already generate 
events and affect web pages; content will want to prevent these default 
actions, but we won't want to let content break users' experience too 
badly (e.g. by capturing the mouse and not letting go).  Content that 
uses touch events would often want to work with both "direct" and 
"indirect" touch events, so we should make it as simple as possible to 
use both.

In Gecko, certain trackpad touch gestures are translated into high-level 
"intentional" events like MozMagnifyGesture and MozRotateGesture. 
(Currently I believe these are exposed to Gecko "chrome" but not to web 

This working group has plans to standardize intentional events like 
these, although we haven't started writing a spec yet.  The high-level 
events may be better for most common use cases than low-level events for 
lots of different input modes.

> Can compatibility indirect touch events be opened as an issue on this spec, please?

Yes, I'll open an issue based on responses to this thread.
Received on Wednesday, 17 August 2011 14:17:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:53 UTC