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

RE: Event: virtual key codes

From: Brad Pettit <bradp@microsoft.com>
Date: Sun, 6 Oct 2002 16:54:52 -0700
Message-ID: <3013537455C0D1459746B2AE2DF47AEA0521F35D@svc-msg-01.northamerica.corp.microsoft.com>
To: "Philippe Le Hegaret" <plh@w3.org>, "Rowland Shaw" <Rowland.Shaw@crystaldecisions.com>
Cc: "WWW DOM" <www-dom@w3.org>

>From: Philippe Le Hegaret [mailto:plh@w3.org] 
> > 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...

So use of keyDown/keyUp should be discouraged for every key except VK_
keys, which should have no unicode equivalent.

One might justifiably use keyDown/keyUp of the 'A' key in a game, for
example, just as one might use the left arrow key -- as an on/off switch
rather than as a means of text input. In that case, there should be some
definition of what code will be in the keyCode ('a' or 'A'). Platforms
generally have conventions for that. DOM should recognize that if it is
going to specify virtual key codes and key events.

--Brad Pettit
Received on Sunday, 6 October 2002 20:19:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC