RE: [DOM3Events] Identifying mouse events derived from touch events
Domenic Denicola <[email protected]> Thu, 22 Jan 2015 04:26:13 +0000
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CY1PR0501MB13692515E0747C8502C5CE34DF490@CY1PR0501MB1369.namprd05.prod.outlook.com> |
From: [email protected] [mailto:[email protected]] On Behalf Of Rick Byers > In the pointer events working group we had other reasons to want an input device API (eg. 'navigator' is really a poor place for 'maxTouchPoints'). Perhaps this is as good as a reason as any to start exposing an input device properties object. I wouldn't argue here for hanging a bunch of extra stuff of it, but it's reasonable to think that over time we'll want an API surface like this. Most other platforms have such a facility (eg. MotionEvent.getDevice() on Android). This seems pretty compelling. Especially given the prior art. It would be nice if someone were willing to sketch out a quick vision of what a future would look like with this idea fleshed out, e.g. I could imagine: - navigator.getInputDevices() => a (sorted?) list of them - some subset of the Android APIs at [1] on the InputDevice objects themselves - the ability to pointer-lock a specific device!? Even if we start small with a very simple TouchEvent.prototype.inputDevice that has a single property like "firesTouchEvents", it'd be helpful to have a vision for the future. I'd also be curious if we could learn from developers on other platforms. E.g., maybe MotionEvent.getDevice() is a universally hated API and all the Android developers in the world wish that Android had done something different? Or maybe they love it? That data would be nice. [1]: https://developer.android.com/reference/android/view/InputDevice.html