Ideally, text is input from a keyboard that can directly produce all the characters needed for that language. It is sometimes the case, however, that text input requires a pre-edit step, whereby text is typed into a pre-edit area using a set of characters, later converted to another set of characters, and passed to the application. An input method is used to convert keyboard input to an encoding suitable for a Text control.
Fortunately, application developers do not need to worry about the input method as long as the Text controls in the application support the display and input of text in the writing system supported by the underlying system. Furthermore, defining how keyboard actions convert into characters suitable for text input and the display is the responsibility of the underlying system.
Designers of Text controls should create Text controls that support display and input of text in any writing system supported by the underlying system. Text controls can also support input and display of multiple writing systems.
System designers need to create input methods that address the following issues of internationalized text input:
The following subsections describe these issues and provide some
guidelines for addressing them, but there is currently too much
variation in systems, and the field is too new for this
guide
to make many firm recommendations about these issues.
Locating the Pre-Edit Area
The trend over time is for pre-edit areas to move closer to the location of the final text. Ideally, pre-edit should occur in place in the Text control being edited (known as an on-the-spot input method). This is technically difficult to do without fully integrating the Text control with the input method. In the absence of an on-the-spot input method, systems should use an over-the-spot input method. An over-the-spot input method places the pre-edit area above but separate from the Text control. In the absence of on-the-spot or over-the-spot input methods, systems can create input methods where the pre-edit area is separate on the display from the Text control that it sends input to. These models are know as off-the-spot input methods. In these input methods, a single pre-edit area can apply to a single Text control, a group of Text controls, an entire application window, or the whole screen. An input method where a single pre-edit area is responsible for all the Text controls on a screen is known as a root window input method.
Systems should support in-place or per-window input methods. They can support per-control, per-group, or per-screen input methods.
When using an off-the-spot input method, converted text obviously goes
to the Text control with the input focus. The pre-edit area itself does not
get the input focus. It only acts as an intermediary for the Text control.
The contents of the pre-edit area prior to conversion can be maintained
separately for each Text control; that is,
when moving the focus from one Text control
to another, the unconverted text from the pre-edit area can be maintained
in the first Text control and any existing unconverted pre-edit text for the
second Text control can be restored to the pre-edit area.
Displaying Status
After a block of text is input to the pre-edit area, the user performs some action, usually a key sequence, that causes the system to convert the pre-edit text into the final characters and pass it to Text control. Using an in-place input method, it is important to show the user which text is pre-edit text and which text has already been converted; that is, the system should give the user some idea of the status of input. In an in-place input method, this status is usually provided by some visual effect such as a font or color difference.
Using any input method including
an in-place input method, the method can include an
additional off-the-spot status area that displays input method status
information such as input and output text formats.
Converting Pre-Edit Characters to Final Characters
When the user requests that the pre-edit text be converted to the final text format, the system may still not have enough information to unambiguously convert the text. In this case, the next step of the conversion depends on the system, the pre-edit format, and the final text format. The conversion can either fail, prompt for more pre-edit text, or present a list of possible choices and let the user pick one. An input method can present conversion choices to the user in a number of ways including the following: