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: Florian Bösch <pyalot@gmail.com>
Date: Mon, 11 Mar 2013 21:24:02 +0100
Message-ID: <CAOK8ODiJm2Akc8u9W0h0Hy3Vf6uMdv4tt1O=j3qyLsT5pWv9xQ@mail.gmail.com>
To: Wez <wez@chromium.org>
Cc: "Hallvord R. M. Steen" <hallvord@opera.com>, Masayuki Nakano <masayuki@d-toybox.com>, "www-dom@w3.org" <www-dom@w3.org>
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
- The keyCode cannot be converted to a users locale/layout/flavor of
physical key cap
Received on Monday, 11 March 2013 20:24:30 GMT

This archive was generated by hypermail 2.3.1 : Monday, 11 March 2013 20:24:35 GMT