beautypg.com

Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 23

background image

Publication 2711P-UM005A-EN-P - March 2007

Introduction to the PanelView Plus CE Terminal 23

Keypad Handler

The Rockwell Automation supplied keypad handler is an optional
software component that can be replaced with a stub or with another
keypad handler designed for a specific application. The handler
operates on Windows Virtual Key codes supplied by the keypad
driver. It can perform translations of Virtual Key codes before the
keypad driver passes these codes to the main keyboard driver for final
processing. Thus, it functions as an intermediate processor between
the keypad driver and the main keyboard driver.

The keypad handler maintains its own key mapping and attribute
tables separate from those maintained by the keypad driver. It can
maintain these tables, in the system registry, system file storage, or
wherever else the implementers of the keypad handler choose.
Although the driver will use these mapping and attribute tables, they
are placed under the control of the handler to facilitate changes in
mapping or attribute information and to facilitate the support of
various keypads. With this scheme, new features and functions can be
accommodated without modifications to the driver or other operating
system level modules. The handler also maintains global configuration
data for the keypad, including auto-repeat settings, single key, and
hold-off mode settings.

The keypad handler is loaded and initialized by the keypad driver,
and the handler must be able to respond to an initial query from the
driver for its key mapping and attribute information. Once the driver
has initialized the handler, the handler is ready to accept additional
calls from the driver to map any incoming virtual key down presses or
releases that are currently valid (subject to the constraints of hold-off
and single key mode, which are enforced by the driver). The keypad
handler may perform some action based on the key code passed (for
example, it may launch an application), it may expand a key code
into a sequence of codes (implementing a macro definition), it may
filter the code and re-map it. Alternatively, it may defer mapping of
the virtual key to the normal keyboard driver. In addition to being
called back for key presses, the keypad handler will be called back
when the global configuration settings for the keypad driver are
changed. The keypad handler or some other application may change
the settings of the keypad driver using the streams interface to be
discussed later. When this occurs, the keypad handler is called back to
ensure that it is aware of the changes.