Rockwell Automation 6182 SDK User Manual
Page 23
Introduction to the RAC6182
1–17
Publication 6182-UM002B-EN-P
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 implementer of the keypad handler chooses. Although these
mapping and attribute tables will be used by the driver, 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, etc.
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 handler has been initialized by the driver, it 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, re-map it, etc. 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.
Registry keys used by KHSTUB.EXE
The operating system includes a simple keypad handler stub which may
be used when the more sophisticated capabilities in the Rockwell handler
are not required. This stub defers all mapping from the virtual key level
up to the main keyboard driver. The registry keys khstub uses to obtain
keypad mapping and other information are documented here in case
application developers wish to use the same keys.