W3C home > Mailing lists > Public > public-webapps-bugzilla@w3.org > August 2012

[Bug 18341] Needs some guidelines for computing key and char values of KeyboardEvent when some modifier key is pressed and not causes text input

From: <bugzilla@jessica.w3.org>
Date: Mon, 13 Aug 2012 06:24:02 +0000
Message-Id: <E1T0o4I-00057i-C8@jessica.w3.org>
To: public-webapps-bugzilla@w3.org

--- Comment #2 from Masayuki Nakano <masayuki@d-toybox.com> 2012-08-13 06:24:02 UTC ---
(In reply to comment #1)
> 1. Shortcut keys (e.g., Ctrl+'ر' (U+0631: Arabic Letter Reh, which is in the
> same physical location on the Arabic keyboard as the 'V' key.)
> 2. Language-agnostic physical key location.
> In #1 the scenario is language-dependent. The web author would need to assume
> that the user has an Arabic keyboard layout (much like EN web apps assume a
> Latin keyboard layout), and would code to the KeyboardEvent.key (or char) which
> would be a 'ر', when that key is struck.
> In #2 the scenario is language-independent. The user wants to react to the
> physical key that has a label 'V' in latin-based keyboards, and 'ر' in Arabic
> keyboards, etc. In this case, the dev won't want to use key or char. Rather,
> the dev will want to use the scan code representation of the key, which is
> reported by legacy keyCode/charCode properties on the event.

I think that the both scenario could be expected by web application developers.
If somebody think that they want to know the input character if neither Ctrl
key nor Meta (Command) key is pressed, they want the language dependent

On the other hand, If others think that they want to implement shortcut key on
their web applications, they want to know which Latin character is expected by
the user with the key combination.

Therefore, I think that "char" should have language-dependent value and "key"
should have language-independent value if the key combination doesn't cause
text input.

And I think that D3E shouldn't recommend to use legacy keyCode and charCode
because the values haven't been standardized yet. However, if they would be
standardized, it's too risky web browsers to change the values due to
compatibility with old web applications which check different values for each
UA. (And also, Firefox uses them in its UI code, so, changing keyCode and
charCode needs big change and a lot of tests.)

Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 13 August 2012 06:24:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:04:25 UTC