Input Method Editor Registry Settings (Compact 2013)
3/28/2014
You can configure the Input Method Editor (IME) by using the following registry settings.
Multiple IME Support
To support multiple IMEs on a device, the IMEs must all support IMELEVEL 3. Note that you must restart the device after modifying the IMELEVEL of the OS for it to take effect. Set the IME level of a device by using the following registry value, located in the key HKEY_LOCAL_MACHINE\SYSTEM\GWE\Edit.
Name |
Type |
Description |
Default value |
---|---|---|---|
IMELEVEL |
REG_DWORD |
If set to 3, specifies that IMELEVEL 3 is supported, which is required if multiple IMEs are on a device. |
3 |
Set the ability to switch between multiple IMEs in the current application process or in all processes by using the following registry value, located in the key HKEY_LOCAL_MACHINE\SYSTEM\IME. The default is for all processes.
Name |
Type |
Description |
Default value |
---|---|---|---|
ConcurrentIMESwitching |
REG_DWORD |
Specifies if input switching applies to all threads or only to the current thread.
|
1 |
Keyboard Layout Definitions for IME Switching
If the current input language does not support a keyboard, then the keyboard generates a new keyboard event. The Input Method Manager (IMM) switches the active layout to the most recent layout used by that keyboard, if possible. Otherwise, it loads the default layout for that keyboard that matches the default boot input language, which is defined by the Preload registry key HKEY_CURRENT_USER\Keyboard Layout\Preload\.
The Preload registry key defines the default keyboard layout to use when a device boots, but only if the default keyboard layout language is not defined in the registry key HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\@ for the current input language defined by HKEY_CURRENT\SYSTEM\Input\CurLang. However, the Preload registry key always affects the Alt+Shift keyboard layout switching order.
For more information about the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts registry key hive and the HKEY_CURRENT_USER\Keyboard Layout\Preload\ registry key that define the device keyboard layout, see Input Language Data.
Device Language Settings
Set the current input language for a device by using the following registry value, located in the key HKEY_CURRENT_USER\SYSTEM\Input\.
Name |
Type |
Description |
Default value |
---|---|---|---|
CurLang |
REG_DWORD |
Specifies the locale identifier (LCID) of the current input language. |
LCID of the (Multilingual User Interface) MUI language |
The HKEY_CURRENT_USER\SYSTEM\Input\ registry key conforms to MUI standards, and the default value for each MUI language is the LCID of the MUI language as shown in the following example.
[HKEY_CURRENT_USER\SYSTEM\Input\]
CurLang="0404"
Set the default keyboard layout to use for each language by using the following registry value, with the set of registry keys HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>.
Name |
Type |
Description |
Default value |
---|---|---|---|
@ |
REG_DWORD |
Specifies the default keyboard layout to use for this language. For example: |
None |
Language-specific mappings for Keyboard and SIP Layouts
The keyboard driver and the software-based input panel (SIP) both utilize a new method in Graphics, Windowing, and Events Subsystem (GWES), keybd_eventEx, to generate keyboard events. The keyboard driver generates messages based on the keyboard driver .dll created by the OEM and the active layout that is defined at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts. PostKeybdMessageEx and keybd_eventEx generate keyboard events and provide information about the specific keyboard that creates the message. The keyboard driver and SIP must call keybd_eventEx and pass it the unique GUID of the keyboard.
Set the installed layouts that are supported by the current combination of keyboard GUID and input language by using the following registry values, located in the key HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\Keyboard\<GUID>.
Name |
Type |
Description |
Default value |
---|---|---|---|
@ |
REG_DWORD |
Specifies the default keyboard layout to use for this language. For example: |
None |
1 through 15 |
REG_DWORD |
Defines the additional layouts that are supported by the current keyboard GUID and input language pair. |
None |
A maximum of 16 layouts can be associated with a single keyboard GUID and input language pair.
Set whether or not the device will automatically switch to the appropriate SIP when the IME is switched by using the following registry value, located in the key HKEY_CURRENT_USER\ControlPanel\Sip\AdaptedToIMEChange.
Name |
Type |
Description |
Default value |
---|---|---|---|
AdaptedToIMEChange |
REG_DWORD |
|
None |
The SIP layout mapping must be set in HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\Keyboard\<GUID> or no switching will be performed.
When the IMM identifies a keyboard input event, it uses the ID of the keyboard, the current input language, and this registry key to determine if the current layout is supported. If it is not, the IMM loads the default layout defined by HKEY_LOCAL_MACHINE\SYSTEM \Input\lang_<LCID>\Keyboard\<GUID>\@ before it sends the keyboard event any further in the input stream. After a supported IME is identified, the IMM calls ActivateKeyboardLayout to switch to the new IME. Then the IMM sends the key event to the IME to be processed.
The following registry settings are affected when the current input language changes:
- HKEY_CURRENT_USER\SYSTEM\Input\CurLang is updated.
- The active keyboard layout is checked against the supported layouts defined under HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\. If the layout is not found, the IMM loads the default layout at HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\@.
- If a SIP is active, the IMM loads the default SIP for the new language set at **HKEY_CURRENT_USER\ControlPanel\Sip\**DefaultIm. For more information, see Input Panel Registry Settings.
Installing and Uninstalling a Third Party IME
To install or uninstall a third party IME, you must modify the HKEY_LOCAL_MACHINE\SYSTEM\Input\lang_<LCID>\keyboard\ registry key to include the new keyboard GUID in all associated languages. Each GUID must have the appropriate layouts specified, for @ (the default), and if required, 1-15. Up to 16 keyboards can be defined per language. If this registry key is not set, the IME may not work with the keyboard or SIP.
Third-party IMEs can install side-by-side with existing IMEs or the third party IMEs can replace existing IMEs by deleting the existing default registry keys that map the keyboard ID and language to a specific layout. For a side-by-side installation, the IME must not modify the default @ registry key value for any keyboard and language to layout mapping. Instead, you should install a new numbered key between 1 and 15.