[D3E] Gecko will start supporting KeyboardEvent.key from Firefox 23, but only for non-printable keys

Hello.

I have good news, I implemented KeyboardEvent.key *only* for 
non-printable keys on Gecko.
https://bugzilla.mozilla.org/show_bug.cgi?id=842927
The first release of it is Firefox 23 released at early of this August.

Basically, we don't define new DOM key name values except a few numbered 
keys such as Fxx and LaunchApplicationxx. D3E spec allows to name by 
browser venders, but I'd like to suggest that such keys should be vender 
prefixed for compatibility between browsers in the future. The key 
values are accessed with script. So, if they compare it with a value, 
they can drop the vender prefix by the script. So, it won't cause the 
problem like CSS's vender prefix. Then, web developers don't believe any 
non-standard key names as standard (spec'ed) key names.

# I already filed a lot of new key names to the bugizlla of w3.org.

For printable keys, Gecko returns "MozPrintableKey". When we support 
.char attribute, we will fix it. I believe that this decision doesn't 
make current web developers confused.

native keycode to DOM key name table for all platforms is here:
http://mxr.mozilla.org/mozilla-central/source/widget/shared/NativeKeyToDOMKeyName.h

And you can also check the mapping on each platfrom:

Windows:
https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#keyname_table_win
Mac:
https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#keyname_table_mac
Linux (GTK):
https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#keyname_table_gtk
Android (same as Firefox OS):
https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent#keyname_table_android

I hope that this mapping tables are useful for other browser developers!

Thank you.

-- 
Masayuki Nakano <masayuki@d-toybox.com>
Manager, Internationalization, Mozilla Japan.

Received on Tuesday, 30 April 2013 02:35:38 UTC