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

Re: DOM Keyboard Event Level 3 questions about proposal

From: (wrong string) Егор Николаев <termi1uc1@gmail.com>
Date: Sun, 10 Mar 2013 23:48:02 +0400
Message-ID: <CAP=KyTgzo3pVQwR67T3py807C6e1TU4ddcp8=+AQ0vp07dKLng@mail.gmail.com>
To: Brad Pettit <Brad.Pettit@microsoft.com>, Masayuki Nakano <masayuki@d-toybox.com>, "www-dom@w3.org" <www-dom@w3.org>, Wez <wez@chromium.org>
Sorry for my misunderstanding. At last I found a time to read the latest UI
Events Editor's Draft. The way how "code" property works is the way I
wanted to "key" property works.

But why the "code" values is so complicated?
For example: event.code='ShiftLeft'. If I need to detect the exactly
'Shift' key, I can read 'location' property. In the most common scenarios I
need to detect just 'Shift' key without exactly location.
Another example is event.code="Digit2". While I can understand "ShiftLeft"
value - it brings additional information, I can't understand the
"Digit"/"Key" prefix. There is no other "2" value in the spec, no need to
do the "code" values so complicated. Why can't it be just "2" as well as
"KeyA" be just "A"?

But this is just my first impressions. I think I need to create another
thread to discuss this or could anyone tell me the link/name of "code"
property discussing thread if it exists?

In the end I want to say that my original request was granted. The "key"
and "code" properties, in my opinion, far from ideal, but it will work.
Thanks for all who answered my questions and big thanks to all who has been
involved in solving the "key"/"code" problem.
Received on Sunday, 10 March 2013 19:48:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:20 UTC