W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Re: [D4E] KeyboardEvent.code and KeyboardEvent.queryKeyCap() are very strange spec

From: Wez <wez@chromium.org>
Date: Mon, 11 Mar 2013 13:41:39 -0700
Message-ID: <CALekkJem+wDxrxnB2YyzNCL-FUByKgKUJdPTeac29Evk+vTckQ@mail.gmail.com>
To: Florian Bösch <pyalot@gmail.com>
Cc: "Hallvord R. M. Steen" <hallvord@opera.com>, Masayuki Nakano <masayuki@d-toybox.com>, "www-dom@w3.org" <www-dom@w3.org>
On 11 March 2013 13:24, Florian Bösch <pyalot@gmail.com> wrote:

> On Mon, Mar 11, 2013 at 8:41 PM, Wez <wez@chromium.org> wrote:
>
>> The critical difference between "keyCode" and "code" is that the
>> prevalent implementation of "keyCode" uses Windows virtual-key codes, which
>> change for some keys depending upon layout. It's also implemented using
>> other completely different schemes by some browsers. So normative
>> documentation isn't really an option.
>>
>
> keyCode also has the following problems:
>
> - The same keyCode is issued for different physical keys
> - The same physical key emits different keyCode based on modifier keys
>

Which keys are you thinking of?  keyCode changes for some keys based on
lock-states (the NumPad keys) but not for shift/ctrl/alt modifier-states.

- The keyCode cannot be converted to a users locale/layout/flavor of
> physical key cap
>
Received on Monday, 11 March 2013 20:43:10 GMT

This archive was generated by hypermail 2.3.1 : Monday, 11 March 2013 20:43:13 GMT