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 22:00:33 +0100
Message-ID: <CAOK8ODiJ0p2pmE3553qDWqP7qcXUVU_MWbcawqvhxnfKAnuyhg@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 9:41 PM, Wez <wez@chromium.org> wrote:

> 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 key "1" (above the alphabet) has the keyCode 49, but when I press
shift+"1" it becomes 187.
- the key "0" (numpad) has the keyCode 96, but when I press shift+"0" it
becomes 0
- left/right shift both have the same keyCode (16)
- left/right ctrl have the same keyCode (17)
- main block and numpad "enter" have the same keyCode (13)
- The backtick key does not trigger a keydown event (`/^), only on the
second press it does.
- The $ key is 52 unmodified, but 220 with shift
- etc. etc.
Received on Monday, 11 March 2013 21:01:00 GMT

This archive was generated by hypermail 2.3.1 : Monday, 11 March 2013 21:01:02 GMT