[Bug 21137] Define key names for game controller of Android

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21137

--- Comment #9 from Masayuki Nakano <masayuki@d-toybox.com> ---
(In reply to comment #8)
> (In reply to comment #4)
> > > Being told "the user pressed GameButtonY" doesn't tell the web developer
> > > anything.  It doesn't even mean "pushed a button with a Y on it"--it might
> > > be a controller with PSX labels, which has symbols rather than letters.
> > 
> > Absolutely. However, I believe that it's impossible to tell the button
> > position on any platform. E.g., see the controllers for PS3 or XBOX 360 in
> > game stores. The button position can be changed by the controller vender.
> 
> Not at all.  It's not hard to tell that you're on a 360 controller, and to
> map things appropriately.  Any competent joystick API will handle this,
> giving implementation direction for common controllers, so games using the
> API can have sensible default mappings for various production controllers. 
> But, this isn't a gamepad API trying to solve these problems.

I meant that even if the button is labeled "L1", the button isn't like a
trigger key if the controller is a joystick. So, telling which button is being
pressed to web developer with any API set never tells actual meaning.

> > So, web application as game platform needs to implement button configuration
> > on each application since there are a lot of different environment. But
> > then, the platform information and the key name should help the developers
> > to decide default button configuration. So, I think that .key for games is
> > useful if the developer checks the platform name. Therefore, I think it does
> > make sense to tell "button Y pressed" with key event to web applications for
> > their developers.
> 
> Woah, wait.  Hold up.  You're designing a web API with the expectation of
> people using UA sniffing to figure out what the symbols mean?

I think that the important thing for web developers is, they can distinguish
the pressed button from other buttons. I think the description of the last part
(* of GameButton*) does NOT tell useful information to web developers.

Like Android, if there is no reference hardware design on the platform,
probably web game developers need to check the UA or hardware vender for
providing better default button settings for their users.

On the other hand, if there is a reference hardware design like XBOX or PS, web
game developers can provide better default button settings with the platform
information.

But if KeyboardEvent.key doesn't provide the button names, they cannot
distinguish the buttons and if it's not defined in D3E spec, UA implementers
might define different button names for same buttons on Android. Therefore, I
filed this bug for the compatibility between web browsers on Android.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 7 March 2013 05:19:23 UTC