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.