W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

Re: [DOM3 Events] key values list

From: Andrew Oakley <andrew@ado.is-a-geek.net>
Date: Wed, 4 Apr 2012 18:39:22 +0100
To: "Hallvord R. M. Steen" <hallvord@opera.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <20120404183922.3cc6dda2@ado-amd-gentoo.moore.slainvet.net>
On Fri, 23 Mar 2012 12:35:59 +0100
"Hallvord R. M. Steen" <hallvord@opera.com> wrote:

> Some issues regarding the key values list:
> http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#key-values-list
> 
> * I can't find Backspace listed

Even worse, it's the backspace key is given as an example of a key that
has different character and key values.
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#keys-keyvalues

> * I'm curious why keys like Esc, Cancel, Del have "char" values in this  
> table. IMO this is sort of contrary to the definition of "char" being the  
> *printable* character associated with that key press. How do we help  
> authors by setting .char to those arcane, non-printable ASCII control  
> characters?

I don't think these values are actually used.  The section of the
specification that specifies the values for char and key says that if
the primary current function of the key is to serve as a function key
then char must be set to the empty string.  
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#keys-Guide

If you had a key with a primary function of generating a control
character then I think char should be set to the relevant control
character.

I think this needs to be explained more clearly in the specification, I
certainly don't understand what the intention is.

On a lighter note, some of the function keys seem to be names oddly.  We
seem to have MediaRewind and FastFwd, I think MediaFastFwd would be
more consistent.  There is also a key called RecordSpeedNext, but I'm
not sure we really need support recording from the Tardis.  I think
there were more keys that CE-HTML had defined that probably should be
added to the list.  If there is interest in changing these then I have
a more comprehensive list somewhere...

-- 
Andrew Oakley
Received on Wednesday, 4 April 2012 17:38:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT