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 27991 - [D3E-code] What's the good value of 0 key - 9 key of feature phones?
Summary: [D3E-code] What's the good value of 0 key - 9 key of feature phones?
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 27996
  Show dependency treegraph
 
Reported: 2015-02-10 04:59 UTC by Masayuki Nakano
Modified: 2015-03-11 01:41 UTC (History)
4 users (show)

See Also:


Attachments

Description Masayuki Nakano 2015-02-10 04:59:38 UTC
Feature phones have 0 - 9 keys. Should their .code values be Digit[0-9] or Numpad[0-9]? If we assume them in Numpad, at least the key events of them should return true for the result of .getModifierState("NumLock").
Comment 1 Tab Atkins Jr. 2015-02-10 23:15:15 UTC
I'd assume they should just be Digits.
Comment 2 Travis Leithead [MSFT] 2015-02-11 01:20:20 UTC
I'd also assume Digits, since (on my phone) the numbers run across the top (reminding me of the physical keyboard layout above the ascii keys).

For keyboards that are specifically numerical (e.g., key'd off of <input type="number">) then perhaps Numpad would be more appropriate.
Comment 3 Gary Kacmarcik 2015-02-11 01:30:01 UTC
tl;dr : 'Numpad' is the appropriate set of values to use.

The 'Digit*' keys are the one that happen to produce digits for an US layout (and punct for the shifted state).

In other locales (like French), they do not produce numbers in their unshifted state.

The 'Digit' name is based on the US layout usage (since we had to choose a canonical layout for naming purposes). Thus, the 'Digit' name does not mean that these are primarily digit keys (just like 'KeyA' does not produce an 'A' in all locales.

The 'Numpad' keys, on the other hand, are primarily number keys that are arranged in a grid. They are not affected by the current locale. These values are appropriate for numpads (on keyboards), calculators and phones.
Comment 4 Gary Kacmarcik 2015-02-11 01:31:33 UTC
Another summary: 'Digit' varies by locale, 'Numpad' doesn't.
Comment 5 Masayuki Nakano 2015-02-11 01:55:27 UTC
I agree with Numpad* approach without NumLock hack because it makes fixing bug 27990 easier.
Comment 6 Gary Kacmarcik 2015-03-11 01:41:08 UTC
Text has been updated to specify that Numpad0 - Numpad9 should be used for phone keys.

https://dvcs.w3.org/hg/dom3events/rev/b1ba98eac6aa