Layout Manager (Windows CE 5.0)

Send Feedback

Layout Manager manages the Device Layouts and Input Languages with respect to the platform dependent driver (PDD) and the rest of the OS. Layout Manager implements the Microsoft® Windows® CE .NET 4.1 and earlier keyboard driver interface so that Windows CE .NET 4.1 and earlier keyboard drivers can access the Graphics, Windowing, and Events Subsystem (GWES) interface.

The following list shows, in sequence, how the Layout Manager handles scan codes:

  1. PDD receives a scan code.

  2. PDD sends the scan code to the Layout Manager.

  3. Layout Manager converts the scan code to a virtual-key code based on the keyboard that sent the event and its current device layout.

  4. Layout Manager remaps the scan code based on the keyboard that sent the event and its current device layout.

  5. Layout Manager handles the auto-repeat functionality.

    All keyboards share the same auto-repeat settings.

  6. Layout Manager calls keybd_event to send an event or events.

If the input locale is changed between when the PDD gets the event and the Layout Manager processes it, the keyboard event is mapped to the new device layout.

When a request arrives to convert a virtual-key code to Unicode, Layout Manager uses the modifier state and tables that are specific to the current Input Languages. Before this, Layout Manager performs the ALT + numeric keypad logic that enables arbitrary Unicode characters to be generated by holding down ALT and typing the numeric value of the character on the numeric keypad.

Layout Manager stores information about each PDD in an array indexed by the keyboard identifier that is assigned by Layout Manager when it initializes the PDD. Layout Manager keeps a set of entry points, available device layouts, and current device layout for each PDD.

When the input locale changes, Layout Manager changes the device layout for each PDD to the one matching the new input locale. It also switches the input language to the one described by the low word of the input locale.

Layout Manager interfaces with GWES the same way that the Windows CE .NET 4.1 and earlier keyboard driver does, which is through the PFN_KEYBD_DRIVER_XXX functions, but also has additional PFN_LAYOUT_MGR_XXX functions.

Layout Manager supports multiple keyboard layouts, switching keyboard layouts at run time, packaging multiple device layouts and input languages into one run-time image, and adding new layouts at run time. For example, at run time you can switch from a German keyboard layout to a Dutch keyboard layout.

The following table shows definitions of Layout Manager terms.

Term Definition
Device layout Hardware-specific information, which includes the scan code to virtual-key code translations and virtual-key remapping functions.
Input language Generic mapping of virtual-key codes to Unicode characters that takes the SHIFT key state into account. The input language also includes the virtual-key code to scan code mapping, because this mapping is always to XT scan codes for the Remote Desktop Protocol (RDP).

The input language and the device layout correspond to one another. Each keyboard type, such as a PS/2 keyboard or a matrix keyboard, has a current device layout that matches the globally shared current input language.

Input locale Pairing of an input language with an input method. The input locale identifier is a number. For example, the input locale identifier for a standard United States 101 keyboard is 00000409. The low word is the language identifier and the high word is a type identifier. The input locale identifier for a Dvorak keyboard is 00010409.

An input locale and an input locale handle differ. Once an input locale is loaded, Layout Manager generates a handle to an input locale (HKL) for the input locale that can be used with the keyboard APIs.

See Also

Keyboard Drivers | Keyboard PDDs | Device Layouts | Input Languages

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.