W3C home > Mailing lists > Public > public-pointer-events@w3.org > October to December 2012

Re: Some comments about Pointer Events

From: François REMY <francois.remy.dev@outlook.com>
Date: Tue, 20 Nov 2012 11:02:02 +0100
Message-ID: <SNT124-DS14107529F6FCE61683F13FA5550@phx.gbl>
To: "Jacob Rossi" <Jacob.Rossi@microsoft.com>, "Pointer Events WG" <public-pointer-events@w3.org>
|  Can you give me a "for instance" for you proposed approach?

I already did: The Samsung SPen Android APIs returns
    - 0 when no contact
    - 1 when normal pressure (or when there's contact with the finger)
    - any positive number proportionnally to the normal pressure

However, their documentation says that the "expected" range is usually 0-1 
(but that if the user modifies the pressure settings it's possible to get 
the stylus to work in a [0-0.5] or a [0-2] range instead).

So, to put things in perspective, it seems that the "normal value" of most 
styluses is their "maximal" value (unless they have been reconfigured to be 
less or more precise).

My recommendation would then be to specify that the value returned by 
"pressure" is unrestricted (apart from being positive) but is -likely- to 
lay in the [0-1] range. However, some styluses + driver configurations may 
end up with results higher than 1.0 (for example if the user increased 
sensibility and didn't check 'clamp values at 1'). Maybe that use case isn't 
very well spread for now (and maybe some UAs will ignore values higher than 
one and clamp them) but at least an UA (that wants to support a specific 
kind of input device that can have a "hard pressure" mode) can do that and 
still respect the specification.

Also, I would prefer if a device that doesn't support pressure could return 
'1' instead of '0' when it's being pressed down. Alternatively, we could use 
a 'supportsPressure' property. Or we could do both. 
Received on Tuesday, 20 November 2012 10:02:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:20:24 UTC