RE: Event: virtual key codes

On Thu, 2002-10-03 at 04:09, Brad Pettit wrote:
> I question whether it's appropriate for DOM to define as many virtual keys as it already does. Many of these keys are very device- or platform-specific.
> 
> Also, you mention Unicode, which seems orthogonal to the discussion of virtual key codes. Aren't VK_ codes intended for key events and not character events? For example, there are not separate VK codes for '3' and '#' because they occupy the same key on the qwerty keyboard.

Keycodes are device specific in any case so relying on them for
keydown/keyup would be inappropriate imho. Instead we rely on the
character that would be generated by pressing the key. 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 'a' on keydown/up, shift+3 generates '3' (and not '#').
Yet another inconsistency in the keyboard character system...

Philippe

Received on Thursday, 3 October 2002 01:54:58 UTC