The Gamepad API assumes you aren't using the gamepad.

Florian Bösch pyalot at
Sun Oct 25 11:00:42 UTC 2015

On Sun, Oct 25, 2015 at 10:13 AM, Carl Smith <carl.input at> wrote:

> ​Thanks for the link, Florian. I hadn't seen that. I don't think you can
> emulate the mouse with pointerlock. It works differently.​
You cannot emulate the mouse for two reasons:

   - You can't synthesize the necessary events to make it work (or some of
   the events synthesized aren't picked up correctly)
   - The mouse pointer is deep in the OS and is drawn at much higher
   frequency/lower latency than other things, at an interval of 60fps and
   given the latencies that browsers introduce, a smooth pointer emulation is

However that does not mean that pointerlock is a pointless API. UAs/OSes
can work on getting the latency down, and it is a useful API for some kinds
of content.

> The thing is, I don't think the Gamepad API needs extending. It needs
> removing from ES6​.

ES6 is not responsible for the APIs that UAs offer. ES is administrated by
ECMA whereas the APIs are administred by W3C and WhatWG. As such ES6 has
little say in what API is supported or not.

> It will never work without breaking everything
> that uses it.

> Currently, no extension can use the Gamepad API without conflicting with
> any other extension that uses it, and the entire Web. And the browser
> can never offer first-class support for pads for the same reason.
> To the extent that we can't break the Gamepad API, we can't use pads in
> extensions or to control the browser. As we go into a SmartTV era, that
> will probably be pretty bad.

There is a host of content that uses the Gamepad API just fine. There are
some improvements that should be made to the API for platforms whose
primary interaction with the UA happens trough HIDs other than a mouse and

Regardless, the Gamepad API exists because it satisfies a need that (some)
web applications do in reality have. I don't think the proper solution to
solve gamepads is not to have gamepads.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list