RE: Event: virtual key codes

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 UTC