Keyboard Driver Samples (Windows CE 5.0)
The %_WINCEROOT%\Public\Common\OAK\Drivers\Keybd directory contains the source code for translation libraries for standard multifunction keyboards with 101 keys. This source code is built into hardware interface libraries for PS/2 8042 keyboard controllers and for hardware platforms with no keyboard controllers. The stub PDD is for hardware platforms without a keyboard controller.
The following table shows the location of the source code from which the hardware interface libraries are generated .
Subdirectory of %_WINCEROOT%\Public\Common\OAK\Drivers | Description |
---|---|
keybd\laymgr | Layout Manager, which coordinates keyboard PDDs, device layouts, and input languages |
keybd\ist | Generic keyboard IST |
keybd\Nop | Stub keyboard PDD for a hardware platform with no keyboard controller |
keybd\PS2_8042 | Keyboard PDD and hardware driver for PS/2 8042-compatible keyboard controller |
keybd\DeviceLayouts | Scan code to virtual-key translation tables for AT scan code sets and virtual key remapping functions in several international types |
keybd\DeviceLayouts\Remap
keybd\DeviceLayouts\Remap\NumPadRmp |
Virtual key remapping libraries
NumPad remapping library |
keybd\DeviceLayouts\PS2_AT
keybd\DeviceLayouts\PS2_AT\00000409 keybd\DeviceLayouts\PS2_AT\00010409 keybd\DeviceLayouts\PS2_AT\00000409 keybd\DeviceLayouts\PS2_AT\00000412 |
AT scan code device layouts
United States 101 keyboard Japanese (NEC layout) keyboard Japanese (IBM layout) keyboard Korean keyboard |
keybd\InputLangs
keybd\InputLangs\0409 keybd\InputLangs\0411 keybd\InputLangs\0412 |
Virtual key to character input languages
United States English Japanese Korean |
keybd\dll
keybd\dll\Kbd8042Us keybd\dll\Kbd8042Jpn1 keybd\dll\Kbd8042Jpn2 keybd\dll\Kbd8042Kor keybd\dll\KbdNopUs keybd\dll\KbdNopJpn1 keybd\dll\KbdNopJpn2 keybd\dll\KbdNopKor |
Creates AT scan code and null driver libraries that can be linked during the Sysgen phase |
All of the sample platforms shipped with Windows CE use keyboard drivers based on the model device driver (MDD) code in the %_WINCEROOT_%\Public\Common\OAK\Drivers\Keybd directory. All of the sample platforms support keyboards that transmit AT scan codes.
The following table shows the libraries that link to build the driver.
Library | Description |
---|---|
Keyboard controller interface | Very hardware platform-dependent. |
Interrupt service thread (IST) | Can be used on most hardware platforms. |
Scan code to virtual-key mapping | Different combinations of the scan code to virtual-key, virtual-key to character, and virtual-key mapping libraries create all varieties of international keyboards. |
Virtual-key to character mapping | Different combinations of the scan code to virtual-key, virtual-key to character, and virtual-key mapping libraries create all varieties of international keyboards. |
Virtual key remapping | Different combinations of the scan code to virtual-key, virtual-key to character, and virtual-key remapping libraries create all varieties of international keyboards.
Virtual key remapping generates virtual keys based on the state of particular physical keys and key modifiers, such as SHIFT and ALT. It is required on hardware platforms that do not have a standard physical keyboard. |
Some hardware platforms use the PS/2 keyboard controller, which links during the Sysgen build phase and some use controller-specific code that is in their Platform or CSP directories.
Sample code for keyboard drivers is provided in the following directories:
- %_TARGETPLATROOT%\Drivers\KBDMOUSE
- %_TARGETPLATROOT%\Drivers\KEYMSE2
- %_TARGETPLATROOT%\Drivers\PS2KBDMOUSE
- %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd
The driver in the %_WINCEROOT%\Public\Common\Oak\Drivers\Keybd directory is a layered driver. This driver generates virtual keys based on the state of particular physical keys and modifier keys, such as SHIFT and ALT. It also implements virtual key mapping. The virtual key remapping handles the case where the NUM LOCK key is engaged while a SHIFT key and a numeric keypad key are pressed. When this happens, key presses on the numeric keypad should behave as if the NUM LOCK key is not active. For example, the 8 key on the keypad should generate a cursor-up key event.
See Also
Keyboard Driver Registry Settings | Keyboard Drivers
Send Feedback on this topic to the authors