Creating the Keyboard Device Layout (Windows CE 5.0)
Use the Kbdgen.exe tool to generate the files necessary to build a device layout library for the keyboards for your hardware platform. The Kbdgen.exe tool generates necessary source and registry files to build this library.
A platform-dependent driver (PDD) has a device layout for each supported locale. Each device layout includes the scan code to virtual-key code table and the virtual-key code remapping function. The device layout can be in its own dynamic-link library (DLL) or you can include it in Kbdmouse.dll.The device layout's entry point returns a data structure containing the mask that matches the device layout to a specific PDD, the scan code to virtual-key code tables, and the virtual-key code remapping function, which can be NULL if it is not required. A prefix and input locale generate the name of the entry point. For example, a device layout with a prefix listed in the registry as PS2_AT under the 00000409 input locale has an entry point named PS2_AT_00000409.
For an example of a device layout, in the latest Platform Builder installation, see %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd\Devicelayouts\Ps2_at\00000409\Ps2_at_0000409.cpp.
For an example of required registry keys, in the latest Platform Builder installation, see %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd\Laymgr.reg.
Perform each of the following steps in the latest Platform Builder installation.
To create the device layout
Use the Keyboard Layout Generator Tool to create a PS/2 AT device layout.
For more information, see Keyboard Layout Generator Tool.
Create a DeviceLayout directory within the keyboard driver directory for your hardware platform.
For example, %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\Mykbdmouse\DeviceLayout.
Add a sources file to the DeviceLayout directory.
For an example DeviceLayout sources file, see %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd\DeviceLayouts\PS2_AT\00000409.
Add the Makefile file to the DeviceLayout directory.
For an example DeviceLayout sources file, see %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd\DeviceLayouts\PS2_AT\00000409.
From the files that the Kbdgen.exe tool generated, add the file ending in DL to the DeviceLayout directory.
Add the DeviceLayout directory to the dirs file that builds the entire keyboard driver.
This dirs file is in the hardware platform's keyboard driver directory, which is immediately subordinate to the Drivers directory. For example, %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\Mykbdmouse\Dirs.
See Also
Send Feedback on this topic to the authors