ISSUE-23 (Key Indentifier Case): Should Key Identifiers prioritize uppercase characters [DOM3 Events]

ISSUE-23 (Key Indentifier Case): Should Key Identifiers prioritize uppercase characters [DOM3 Events]

http://www.w3.org/2008/webapps/track/issues/

Raised by: Doug Schepers
On product: DOM3 Events

In the current draft of Key Identifiers, including the new algorithm wording, there is a bias toward uppercase characters.  Essentially, if a key is pressed that gives a character codepoint which is lowercase, for which there is an uppercase equivalent, the uppercase codepoint (or character) is returned instead.  What is the use case here?

Case is a peculiar feature of Latinate languages, and it's not clear that special-casing it makes it easier to make reliable script.  More reliable and flexible comparisons can be made easily; compare the following pseudocode snippets: 

// keyIdentifier reports only "Q", and forces all upper and lower case characters to the uppercase value
if ( evt.keyIdentifier == "Q" ) { ... }

// keyIdentifier reports both "Q" and "q", and allows authors to distinguish upper and lower case letters or lump them together, as desired
if ( evt.keyIdentifier.toLowerCase() == "q" ) { ... }

Converting to uppercase strikes me as needless legacy from keyCode/charCode.  Is there some pragmatic reason to force this casting?

Received on Sunday, 29 June 2008 05:48:32 UTC