W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2002

RE: Event: virtual key codes

From: Philippe Le Hegaret <plh@w3.org>
Date: 03 Oct 2002 11:30:17 +0300
To: Rowland Shaw <Rowland.Shaw@crystaldecisions.com>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1033633818.5244.147.camel@chacal>

On Thu, 2002-10-03 at 09:59, Rowland Shaw wrote:
> > The specification is unclear however on which character 
> > should be generated, i.e. with or without the modifier:
> > - A generates a 'a' on keydown/up, shift+A generates 'A'.
> > - 3 generates a '3' on keydown/up, shift+3 generates '3' (and not '#').
> > Yet another inconsistency in the keyboard character system...

correction:
- A generates a 'A' (and not 'a') on keydown/up, shift+A generates 'A'.
- 3 generates a '3' on keydown/up, shift+3 generates '3' (and not '#').
(using a Linux system and Mozilla 1.1. I need to try with other
OS/navigators as soon as I am back home)
(I stole an example page on the web and improved it slightly in order to
test different OS/keyboards [1])

> In turn, this suggests to me that the best method is to return the (Unicode)
> character -- which a few virtual keys left over for non printing keys (for
> example, cursor, f-keys, esc, etc.)

Agree. This was indeed the intent: virtual keys are for keys without
unicode character representation. If we reintroduce the keyCode, it will
be possible again to rely on the device specific layout btw, but we'll
make clear in the specification that its use should be avoided as much
as possible.

Philippe

[1] http://www.w3.org/2002/09/tests/keys.html
Received on Thursday, 3 October 2002 04:35:16 GMT

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