[Bug 23943] New: It's too difficult to search the code which access KeyboardEvent.key

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23943

            Bug ID: 23943
           Summary: It's too difficult to search the code which access
                    KeyboardEvent.key
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM3 Events
          Assignee: travil@microsoft.com
          Reporter: masayuki@d-toybox.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

I'm working on replacing key names in Firefox with newer WD's key names.

While I'm working on this, I realized that it's difficult to search the code
which uses KeyboardEvent.key. The reasons are:

* .key is too generic name.
* Defined key names don't have any mark such as common prefix.

I think that renaming .key may breaks a few web applications which already use
.key attribute only on supported browsers.

On the other hand, if we can add common prefix e.g., "KeyName" to the
predefined key names, everybody can search such code with using regexp
(KeyName[A-Z][a-zA-Z0-9]+).

Additionally, event.key.match() allows to check if the key event is caused by
printable key in almost all cases. (If there is no key which inputs
"KeyNameFoo"!)

This change may too late. However, at least, it's worthwhile to discuss this
issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Saturday, 30 November 2013 03:06:12 UTC