This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22834 - DOM_KEY_LOCATION_MOBILE and _JOYSTICK are no longer needed
Summary: DOM_KEY_LOCATION_MOBILE and _JOYSTICK are no longer needed
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Gary Kacmarcik
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-30 00:15 UTC by Gary Kacmarcik
Modified: 2013-09-05 16:37 UTC (History)
4 users (show)

See Also:


Attachments

Description Gary Kacmarcik 2013-07-30 00:15:04 UTC
"_MOBILE" is not a well-defined term so it is unclear when this should be set to true. E.g., is a 10" tablet "mobile"? Where is the cutoff between mobile and non-mobile?

"_JOYSTICK" is also probably not needed in this spec since the GamePad API (http://www.w3.org/TR/gamepad/) is meant for these devices.
Comment 1 Masayuki Nakano 2013-07-31 00:04:56 UTC
I understand the "MOBILE" can be used for mobile phone _OS_ which doesn't provide key location information because layout of VKB isn't similar to physical keyboard and/or apps cannot distinguish whether a key event is caused by physical keyboard or VKB.
Comment 2 Gary Kacmarcik 2013-07-31 13:41:25 UTC
So *every* key press on such a device would have location set to MOBILE?

If so, the meaning of the setting isn't really "mobile", but rather "unknown" or "unspecified". Non-mobile devices could, in theory, make use of this value as well.

But looking at Android's keycodes:
   http://developer.android.com/reference/android/view/KeyEvent.html
they have separate values for Shift left/right, Control left/right and Meta left/right.  The location field should be set appropriately for these key events, which precludes the use of MOBILE.

I don't believe that MOBILE is a useful location to have in the spec.
Comment 3 Masayuki Nakano 2013-08-01 06:07:27 UTC
Gecko implemented so.

But I agree, we can guess the location from keycode on Android.

However, if there are some platforms whose application cannot distinguish left or right of modifier key, "unknown" sounds good to me.

Additionally, Android and Linux has a lot of keycode which are not caused by standard keyboard. I believe that "unknown" should be used for them too.

How about to add DOM_KEY_LOCATION_UNKNOWN as 0xFFFFFFFF and remove MOBILE and JOYSTICK?
Comment 4 Olli Pettay 2013-08-01 11:33:53 UTC
Sounds ok to me.
Comment 5 Gary Kacmarcik 2013-08-28 14:00:54 UTC
I don't think having a separate _UNKNOWN value provides any value over simply using _STANDARD.

And adding a new ("mobile"-only) value means that sites that check for _STANDARD (vs. _NUMPAD) are more likely to break on mobile.
Comment 6 Gary Kacmarcik 2013-09-05 16:37:05 UTC
Fixed in latest ED