W3C unveils the Touch Events Specification. It’s a rough draft, I guess — it doesn’t even have an official URL on www.w3.org yet. But I like it a lot.
Editor Doug Schepers did the sensible thing and started with Apple’s specification (see the index), to which he added, to my delight, a fair number of properties I suggested: radiusX/Y
for the touch’s radius, force
to measure the touch’s force, and touchenter and touchleave events that we are going to need badly in the future.
A few remarks:
altKey
, ctrlKey
and shiftKey
should be removed. They don’t make sense in a touchscreen context. True, Apple defines altKey (though not ctrlKey and shiftKey, oddly), but I have no clue what the Alt key is on iOS, and it likely won’t exist on any future touchscreen device, either.radiusX/Y
? Pixels, of course. All other X/Y properties use them as units.force
is going to be an interesting issue. The spec defines an unitless value of 0 to 1, but what exactly does 1 mean? Full force, probably, but how do we define full force? The maximum pressure the device can measure, probably.Does iOS implement it like that? The other browsers don’t — that’s for sure.[...] when the user places a more touch points on the touch surface than the device or implementation is configured to store, in which case the earliest touch point in the list must be removed.
But these are minor points at best. All in all this is an excellent first step towards the specification of touch events.
This is the blog of Peter-Paul Koch, web developer, consultant, and trainer.
You can also follow
him on Twitter or Mastodon.
Atom
RSS
If you like this blog, why not donate a little bit of money to help me pay my bills?
Categories: