[Webkit-unassigned] [Bug 20027] Keyup/keydown keyIdentifier assignments are not W3C compliant

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 9 16:45:10 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=20027





--- Comment #11 from Allan Jacobs <jacobsallanster at gmail.com>  2010-09-09 16:45:10 PST ---
The W3C specification has changed.  Identifying the key independent of state
(that is, of a modifier) is no longer one of it's ambitions.  This makes this bug irrelevant.

Bug 20027 should be closed.

"keyidentifier" refers to content at 
http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvent
and at
http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html .

Refer to http://www.w3.org/TR/DOM-Level-3-Events/#keys-Guide , in a
version of the W3C specification (dated Sept 7, 2010 -- two days ago).  In the
new draft, keyup, keydown, and keypress implement the KeyboardEvent interface
which mandates the presence of attributes 'char', 'key', and 'keyCode'.

Keycode is legacy.  User codes will see a wild variation when changing browsers,
operating systems, keyboard locales, and even shift states.

For most visible characters, 'char' and 'key' will be assigned the same
Unicode character value.  The value depends on modifier state.

'char' and 'key' differ for some punctuation characters.  For instance, hitting
the spacebar causes an event with 'char' set to a space (\u0020) and 'key' set
to the string 'Spacebar'.

Characters with no character representation have 'char' set to null and 'key'
assigned a meaningful value.  For instance, an Up Arrow key has 'char'=null and
'key'='Up'.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list