- From: Wez <wez@chromium.org>
- Date: Thu, 17 Mar 2011 21:19:22 +0000
- To: www-dom@w3.org
- Message-ID: <AANLkTikBJRm1825m+dkFf_G2xjbhadypBP1-=fAq=3OY@mail.gmail.com>
Hi, I've got a couple of questions about the DOM Level 3 Events draft specification for KeyboardEvent: 1. The KeyboardEvent's "key" field contains a "key value", which reflects the meaning of the key taking into account the current keyboard layout, modifiers and other context, as I understand it, so that Shift+A gives "U+0041" but A alone gives "U+0061". Is that correct? What should a key produce if it has neither a character nor a function associated with it in a given context? 2. The "key" field is specified such that it can express keys with code points only from Unicode's Basic Multiligual Plane, which I gather is for ECMAScript conformance. Is the intent to use UTF-16 surrogates for these, as is mention in the doc, in which case an application will see multiple KeyDown events for a single actual event, or could KeyDown and KeyUp support ECMAScript friendly key-identifier strings for BMP, and longer strings for characters outside that? 3. It seems that the only way for KeyUp to work is for the key-identifier it provides to match the one specified in the KeyDown that the key originally triggered, rather than reflecting whatever symbol the key would produce under the current modifiers - is that correct? e.g. the squence Shift-down, a-down, Shift-up, a-up should give "U+0041" as the key-identifier for both a-down and a-up? (BTW, the text for "keyup" seems to be a straight copy of that for "keyup" in the draft) Thanks, Wez
Received on Monday, 21 March 2011 08:22:02 UTC