Share via


Device Layout Data

You can include keyboard device layouts in the OS image build or dynamically load them at run time.

Included in the Build

You can include multiple device layouts in an OS image. To minimize the number of DLLs in the OS image, the device layouts compile into the keyboard driver DLL by default. Entry points generated from the registry identify the device layouts to the Layout Manager.

The 00000409 and 00010409 registry subkeys are the input locale identifiers of the keyboard layouts. Use the appropriate input locale identifier for your keyboard layout. The value name and the locale identifier generate each entry point. If one decorated entry does not exist, the Layout Manager attempts to use the undecorated names. For example, if Matrix_00000409 does exist in Kbdmouse.dll, the Layout Manager attempts to use Matrix. This is useful when the device layout does not need to be localized so the same scan-code-to-virtual-key mappings and remapping functions can be used for every language. The following registry keys describe the PS2_AT_00000409, Matrix_00000409, and PS2_AT_00010409 device layout entries into Kbdmouse.dll.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00000409]
    "Layout File"="kbdmouse.dll"
    "Layout Text"="US"
    "PS2_AT"="kbdmouse.dll"
    "Matrix"="kbdmouse.dll"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00010409]
    "Layout File"="kbdmouse.dll"
    "Layout Text"="United States-Dvorak"
    "PS2_AT"="kbdmouse.dll"

The Layout Manager uses the value of Layout File to determine which DLL contains the input language. The DLL listed for Layout File does not need to match the DLLs listed for the device layout entry points. For more information, see Input Languages.

Add the input locale to the HKEY_CURRENT_USER\Keyboard Layout\Preload registry key as data for numeric values to tell the Layout Manager that this input locale is available. The lowest valued Preload registry subkey specifies the default input locale.

If no input locale is available at boot time, some components of the OS will not function correctly until one is loaded. RDP, SIPs, and HID keyboards will all be affected.

The following registry key shows the HKEY_CURRENT_USER\Keyboard Layout\Preload registry keys.

[HKEY_CURRENT_USER\Keyboard Layout\Preload\1]
    @="00000409"

[HKEY_CURRENT_USER\Keyboard Layout\Preload\2]
    @="00010409"

Note   An error occurs if you ask the Layout Manager to switch to an input locale that does not exist in the Preload registry subkey.

Loaded at Run Time

You can install a device layout at run time. When you install the DLL on the device, be sure to add the DLL's entries to the registry in the same manner as the layouts included in the build described previously.

You can replace any device layout at run time by changing the name of the DLL in the registry. Each time the Layout Manager changes device layouts, the Layout Manager checks the registry for the DLL that contains the entry function.

The following registry key shows the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00000407 registry key.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Layouts\00000407]
    "Layout File"="KbdGer.dll"
    "Layout Text"="German"
    "PS2_AT"="KbdGer.dll"

See Also

Device Layouts

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.