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: Fri, 03 Aug 2012 18:58:08 +0000
Message-Id: <E1SxN4a-0003oO-KK@jessica.w3.org>
To: public-webapps-bugzilla@w3.org

Travis Leithead [MSFT] <travil@microsoft.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |ASSIGNED
                 CC|                            |travil@microsoft.com
         AssignedTo|schepers@w3.org             |travil@microsoft.com

--- Comment #1 from Travis Leithead [MSFT] <travil@microsoft.com> 2012-08-03 18:58:08 UTC ---
I took a look at: http://en.wikipedia.org/wiki/Keyboard_layout#Arabic
to get a feel for other keyboard layouts. Before taking action on this bug, I'd
love to understand what the scenario is (or at least clarify it). You said:

(In reply to comment #0)
> I think that if Web applications want to handle such key events as a shortcut
> key on the page, they may want to know a Latin character of the key. Otherwise,
> they may want to know an unmodified character of the key.

So the scenarios sound like:
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.

Can you clarify your scenario (or confirm one of the above scenarios I called
out) and then perhaps we can work out some clarifying examples for these if not
already clear in the spec. 


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 Friday, 3 August 2012 18:58:09 UTC

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