incorporated feedback by Nakano-san on composition events regarding IMEs and the empty string, updated text on relationship between keyboard events and composition events
--- a/html/DOM3-Events.html Thu Aug 20 18:36:13 2009 +0900
+++ b/html/DOM3-Events.html Tue Aug 25 15:12:05 2009 +0900
@@ -4283,6 +4283,8 @@
<h3 class="div3" id="events-Events-CompositionEvents-Interfaces">5.2.8 Composition Events Types</h3>
<p>This module defines the feature CompositionEvents 3.0 and depends on the feature UIEvents 3.0.</p>
<p>Composition Events provide a means for inputing text in a supplementary or alternate manner than by Keyboard Events, in order to allow the use of characters that may not be commonly available on keyboard. For examples, Composition events may be used to add accents to characters despite their absence from standard US keyboards, to build up logograms of many Asian languages from their base components or categories, to select word choices from a combination of key presses on a mobile device keyboard, or to convert voice commands into text using a speech recognition processor. Refer to Appendix A, "<a href="#keyset-KeySet">Keyboard events and key identifiers</a>", for examples on how Composition Events are used in combination with keyboard events.</p>
+ <p>Not all IME systems or devices expose the necessary data to the DOM, so the active composition string (the "Reading Window" or "candidate selection menu option") may not be available through this interface, in which case the selection may be represented by the empty string.</p>
+ </p>
<dl>
<dt><strong>Interface <em>
<a id="events-Events-CompositionEvent">CompositionEvent</a>
@@ -5418,12 +5420,12 @@
</div>
+
<!-- div3 DeadKeys -->
<div class="div3">
<h3 id="keyset-IME" class="adiv3">A.1.3 Input Method Editors</h3>
- <p class="issue">@@ With the inclusion of Composition Events, how should this section be reworded?</p>
-
- <p>This specification does not provide a representation of the <a href="#glossary-dt-ime">input method editor (IME)</a> events, i.e. the IME's functions and the IME context are not represented in this set. As an example, receiving a <a href="#events-event-keydown">keydown</a> for the "Accept" key identifier does not necessarily imply that the text currently selected in the IME is being accepted. It only indicates that a keystroke happened, disconnected from the IME Accept functionality. Depending on the device in use, the IME Accept functionality can be obtain using the Accept key or the Return key. Keyboard events cannot be used to determine the current state of the input method editor.</p>
+
+ <p>This specification includes a representation of the <a href="#glossary-dt-ime">input method editor (IME)</a> events, i.e. the IME's functions and the IME context are not represented in this set, through the <a href="#events-Events-CompositionEvents-Interfaces">CompositionEvent</a> interface and events. However, composition events and keyboard events does not necessarily map on a one-to-one relationship. As an example, receiving a <a href="#events-event-keydown">keydown</a> for the "Accept" key identifier does not necessarily imply that the text currently selected in the IME is being accepted, but indicates only that a keystroke happened, disconnected from the IME Accept functionality (which would normally result in a <code>"compositionend"</code> event in most IME systems). Keyboard events cannot be used to determine the current state of the input method editor, which should be obtained through the <a href="#events-Events-CompositionEvent-data"><code>data</code></a> attribute of the <a href="#events-Events-CompositionEvents-Interfaces">CompositionEvent</a> interface. Additionally, IME systems and devices vary in their functionality, and which keys are used for selecting that functionality, so the <code>"Convert"</code> and <code>"Accept"</code> keys may be represented by other available keys.</p>
<p>Keyboard events correspond to the events generated by the input device after the keyboard layout mapping but before the processing of the input method editor.</p>
<p>The following example describes a possible sequence of keys to generate the Unicode character 市 (Kanji character, part of CJK Unified Ideographs) using Japanese input methods. This example assumes that the input method editor is activated and in the Japanese-Romaji input mode. The keys <code>"Convert"</code> and <code>"Accept"</code> may be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be respectively "U+0020" (Space key) and "Enter".</p>
<ol>