Keypad driver/handler overview, Keypad driver streams interface – Rockwell Automation 2711P Software Development Kit User Manual User Manual
Page 70
Publication 2711P-UM005A-EN-P - March 2007
70 PanelView Plus CE-Specific Extensions to the WinCE API
Keypad Driver/Handler Overview
The keypad driver and its companion keypad handler form a system
that addresses the following system design goals:
• The operating system contains a keypad driver. The keypad
driver handles low-level interface, system wide functions; i.e.
determining the model of keypad device, interfacing to the
keypad device to obtain scan codes and up/down status,
mapping from scan code to virtual key, auto-repeat, single-key,
and hold-off functionality.
• The keypad handler handles higher level mappings and
anything requiring greater flexibility and extensibility, such as
mapping virtual keys to other virtual keys, multiple virtual key
macros, memory allocation, storage and configuration of
mapping tables used by the keypad driver, and setting global
configuration options used by the driver.
• The Keypad driver loads the keypad handler and communicates
with the handler via callback functions with defined names.
• The Keypad handler or any other application may also interface
with the keypad driver with streams interface calls to configure
or query it.
• The Keypad driver handles the cases when no keypad or no
keypad handler is present.
• The Keypad handler may defer responsibility for performing
virtual key mappings to the keyboard driver, which will perform
normal modifier mappings as it would for a keyboard.
• The Driver/Handler system allows changes to keypad scan code
to virtual key mappings or individual key attributes without
requiring operating system updates.
• The Driver/Handler system allows the addition of new keypad
models without requiring operating system updates.
Keypad Driver Streams Interface
If the keypad driver successfully loads on boot, control of the keypad
driver by the keypad handler or other applications is accomplished by
a streams driver interface. This means that the driver is opened by
getting a HANDLE to it using a standard CreateFile() call. The device
name to open is defined in keypadapi.h as KEYPAD_DRIVER_PREFIX.
Once an application has opened a HANDLE to the keypad driver in
this manner, it may then control or query the keypad driver using
DeviceIoControl() with IOCTLs defined for the keypad driver. The
supported IOCTLs and their parameters are as follows.