Overview

Input Method Editor(IME) is a pre-processor for the user input events, which typically gets the keyboard inputs, performs some editing or conversion, and finally return the result data to the application. IME is an OS/2 DLL which exports 32 bit ImeXXX entries(required) and provides IME Window class if exists.

Compared to the legacy 16 bit IME interface, new 32 bit IME interface has the following features.

Above picture depicts the conceptual block diagram of applications, system and IME.

As seen in the above picture, IME can be called from 3 different environments, i.e., PM, FullScreen, and DOS. When a session is created in each environment(in case of PM, each frame window), system creates an Input Method Instance by default. If there is a default IME whose support language matches the application's language which is related to the application's codepage (In case of FullScreen and Dos, it is the process codepage. In case of PM, it is the input queue codepage), that IME is loaded by the system and notified that the IMInstance is created. IMInstance can also be created by the ImCreateInstance called by the application, which consequently notifies IME of that instance creation.

When the user inputs some keystrokes, IME is notified of those events through ImeNotifyEvent call. IME may process those keystrokes and may generate some display requests which contain the information about conversion intermediate string, conversion candidates, input mode status, etc. by ImRequestEvent call. These display requests are transferred to IMMON.EXE which is a keyboard monitor program for FullScreen application, or to the Bridge process for the MVDM, or PM application. Each display data itself is stored within IMInstance as a handle which is related to a memory block(which is called as Part). In case of PM, if IME has the display capability, those display requests are transferred back to IME's window (which is called as IMEWindow) as PM messages. Then IME displays them by its own user interface.

Also IME may generate the result string which needs to be delivered to the application. The result string can be delivered to the application either a form of string or a combination of some WM_CHARs.

Because IME should be callable from non-PM environment, ImeXXX call should not call any of PM related calls unconditionally. If there is a need to call PM APIs with in any of the ImeXXX calls, check that the current IMInstance's session type is PM. That information is kept in IMInstance.


[Back: 32 bit Input Method Editor Interface]
[Next: Input Method Instance]