Professional Documents
Culture Documents
VersaView 1500W
VersaView 1200W
Table of Contents
Introduction .................................................................................................................................................... 3
Products Supported......................................................................................................................................... 3
Theory of Operation ....................................................................................................................................... 3
Driver Installation and Removal..................................................................................................................... 3
Manual Configuration of Driver..................................................................................................................... 4
Registry Layout .............................................................................................................................................. 4
Attrib Values .............................................................................................................................................. 6
Normal.................................................................................................................................................... 6
Typematic ............................................................................................................................................... 6
Macro/String........................................................................................................................................... 7
Program .................................................................................................................................................. 7
Disabled.................................................................................................................................................. 7
Disable Typematic.................................................................................................................................. 8
Not Typematic ........................................................................................................................................ 8
Macro/String Typematic......................................................................................................................... 8
Predefined Key Definitions ............................................................................................................................ 8
VK Code and Scancode Mappings............................................................................................................... 10
Predefined Keypad Layouts ......................................................................................................................... 14
Driver Messages ........................................................................................................................................... 15
VersaView 1500W Bezel Graphic and Scancode Values............................................................................. 16
VersaView 1200W Bezel Graphic and Scancode Values............................................................................. 18
Filtering USB Keyboards and Keypads........................................................................................................ 19
Safe Mode .................................................................................................................................................... 19
Driver Signing .............................................................................................................................................. 19
Introduction
Rockwell automation pre-installs a piece of software called the Rockwell Automation Keypad Driver
(driver). This driver enhances the capabilities of the keypad on the front bezel of certain Rockwell
Automation VersaView computers. If the driver does not exist on the unit, it may be installed by the end
user.
Although the driver is the piece of software that actually enhances the bezel keypad, the driver is normally
configured using the Keypad Configuration Utility (KCU) software.
The KCU software is used to configure the driver. The keys on the keypad can be configured in a variety
of ways.
Disabled Any key can be disabled. Pressing it has no effect.
Macro/String The programmable keys (i.e. the blue keys - the K, A, and F keys) can be programmed
to an arbitrary sequence of keys. For example, the F1 key could be set to act like d i r <enter>
was typed when F1 is pressed. The key will not repeat if continuously held down.
Typematic The programmable keys can be programmed to behave like another key (including the
addition of emulation of modifier keys (i.e. alt, ctrl, shift). The key will repeat if held down (i.e.
typematic action).
Program Not supported at this time. The programmable keys can be programmed to launch an
application when pressed. The key will not repeat if continuously held down.
The driver also supports additional actions for the keys. These additional actions are not supported by the
KCU.
Products Supported
The Rockwell Automation Keypad Driver supports the Rockwell Automation VersaView 1200W and
1500W computers. It supports running Windows 2000 and Windows XP. The keys on the VersaView
computers can be programmed to emulate keys that do not exist on the VersaView keypads.
Although Rockwell does not support or recommend it, the driver can be installed to filter any PS/2
keyboard on any Windows 2000 or Windows XP system.
Theory of Operation
The Rockwell Automation Keypad Driver is a kernel mode filter driver. It is an upper filter driver for the
i8042 driver for the PS/2 keyboard. It is loaded during the boot sequence and can not be unloaded. It reads
its configuration information (i.e. how to make the keys behave) one time during the boot process. Its
configuration information is stored in the Registry. Any changes to the Registry (e.g. Reconfiguration
using the KCU) are not recognized until the next boot of the system.
During operation of the driver, the driver examines every scan code produced by the PS/2 keyboard (i.e. the
bezel Keypad). After examining the scancode it either eats the scancode or passes it up the device driver
stack. If the driver passes the scancode up, the scancode may be left as is or modified. When modified, it
may be simply transformed into another scancode or may be replaced by a series of scancodes.
The important fact is when the driver filters keys, it only deals with scancodes. It has no concept of
Virtual Key Codes. Virtual Key Codes are the things that Windows applications usually use.
That being said, the KCU writes all of its information to the Registry using Virtual Key Codes. The KCU
has no concept of scancodes. The driver has an internal table that translates the KCUs Virtual Key Codes
to scancodes that the driver uses.
Registry Layout
The driver gets all of its configuration information from the Registry.
All of the Registry information is placed below this Subkey of the Registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Keypadfilter]
Each bezel key is represented by a Subkey with the name of a Virtual Key Code. See the VK Code and
Scancode Mappings section for a list of possible Subkey names. For example, here is a snapshot of what
the Registry might look like.
This example shows configurations for the A1 through A10 and K1 through K10 keys. Note at the bottom
of the picture is the full Registry path.
There are up to eight ways each bezel key can be configured. The driver supports all eight ways, but the
KCU can only be used for four of the configurations concerning the programmable keys. The non-
programmable can only be disabled. The programmable keys are the F, K, and A keys.
The type of configuration of a bezel key is defined by the Registry Value Attrib, which is a
REG_DWORD.
Note 1: Having an Attrib value of 0 is the same as not having an Attrib value at all. It is also the
same as not having a VK_?? Subkey Registry entry for the key. The bezel key has no filtering applied to
it.
Note 2: The Program type is not supported in version 1.0 of the driver.
Note 3: These types are supported by the driver, but not by the KCU.
Attrib Values
Following are details on each of the different Attrib values.
Normal
Having an Attrib value of 0 is the same as not having an Attrib value at all. It is also the same as not
having a VK_?? Subkey Registry entry for the key. The bezel key has no filtering applied to it.
Typematic
This causes the key to have typematic action to it. When the bezel key is held down, it repeats according
to the Control Panels Repeat Delay and Repeat Rate settings. Two additional Registry Value entries are
required MakeString and BreakString. The MakeString value specifies what occurs when
the bezel key is pressed, and what the repeated action is. The BreakString specifies what occurs
when the bezel key is released. Both MakeString and BreakString are of Registry Type
REG_BINARY. Only one key press/release can be simulated, although the Control, Alt, and Shift
modifiers may be added to it.
The data in MakeString and BreakString are pairs of hexadecimal numbers. The first number
specified a VK Code, the second is either a 00 or an 80. The 00 means the key was pressed, the 80
means it was released.
This example illustrates that the F5 bezel key programmed to be Typematic. When the F5 bezel is pressed
the driver simulates a Left-Control down and Enter down keystrokes instead. The a2 is the VK
Code for Left-Control and the 00 means down. The 0d is the VK code for Enter and the 00 again
means down. This can be seen in the MakeString. When the bezel key is released, the driver simulates
the actions of the BreakString. Here an Enter Up and a Left-Control Up occur. The 0d is the
VK Code for Enter and the 80 means up. The a2 means Left-Control and again the 80 means up.
This example illustrates that the K2 bezel key programmed to be Typematic. When the K2 bezel is pressed
the driver simulates an Esc down keystroke instead. The 1b is the VK Code for Esc and the 00 means
down. This can be seen in the MakeString. When the bezel key is released, the driver simulates the
actions of the BreakString. Here an Esc Up occurs. The 1b is the VK Code for Esc and the 80
means up.
Macro/String
This causes the bezel key to have Macro/String action to it. When the bezel key is pressed the driver
simulates the action specified in the MacroString Registry value. No repeat occurs even if the bezel
key is held down. No action occurs when the bezel key is released. Multiple keys can be simulated with
the Macro/String type.
The data in MacroString is in pairs of hexadecimal numbers. The first number specified a VK Code,
the second is either a 00 or an 80. The 00 means the key was pressed, the 80 means it was released.
This example illustrates that the A1 bezel key programmed to be Macro/String. When the A1 bezel is
pressed the driver simulates dir<enter> keystrokes instead. The 44 is the VK Code for d and the 00
means down. Then again the 44 is the VK Code for d but the 80 means up. Similarly the 49 is VK Code
for i, the 52 is the VK Code for r, and 0d is the VK code for Enter. This can be seen in the
MacroString. When the bezel key is released, no action occurs.
Program
Although this is supported by the KCU, it currently not supported by the driver.
Disabled
This causes the bezel key to have no action associated with it when pressed or released.
This illustrates that the Windows key is disabled.
Disable Typematic
This causes the bezel key to not have a typematic action associated with them. This leaves the bezel key at
it default value, but just takes away its typematic action. Even though the Control Panel specifies a Repeat
Delay and Repeat Rate, the bezel key does not repeat.
This illustrates that neither of the Return bezel keys repeat, even if they are held down.
Not Typematic
This is the same as the Typematic setting, except there is no repeat action. The MakeString is not repeated
if the bezel key is held down.
Macro/String Typematic
This is the same as the Macro/String type, except that when the bezel key is held down, it repeats the
MacroString values.
Note this is similar to the CTRL-SHIFT-X hot key combinations. However since this is a Registry value
it persists across reboots. Use of this method is not necessarily recommended because it can cause the
values to be written by the KCU to be ignored.
The strings in the VK Code String column are the names of the Subkeys in the Registry that specifies the
bezel keys to have driver action taken on. The VK Code Constant column information does not exist in
the Registry. It is the #define from the winuser.h file in the DDK. The VK Code column is the
numeric value of the VK Code Constant column. These values are used in the Registry in the
MakeString, BreakString, and MacroString Registry entries.
The Scancode and Scancode Flags columns do not exist in the Registry. During normal operation the
driver only deals with Scancodes (and Scancode Flags) though. So even though the MakeString,
BreakString, and MacroString Registry entries have VK Codes in them, the driver actually
substitutes in a Scancode and Scancode Flag during runtime. This is done according to the table. The
Scancode and Scancode flags are usually not examined by Windows applications, but can be if desired.
The Scancode is in bits 16-23 of the lParam of the WM_CHAR message, and the Scancode Flag is in bit 24.
See the Windows documentation for more information.
VK Code String VK Code Constant VK Scancode Scancode
Code Flags
"VK_LSHIFT" VK_LSHIFT 0xA0 0x2a 0
"VK_RSHIFT" VK_RSHIFT 0xA1 0x36 0
"VK_LCONTROL" VK_LCONTROL 0xA2 0x1d 0
"VK_RCONTROL" VK_RCONTROL 0xA3 0x1d 0xE0
"VK_LMENU" VK_LMENU 0xA4 0x38 0
"VK_RMENU" VK_RMENU 0xA5 0x38 0xE0
"VK_SHIFT" VK_LSHIFT 0xA0 0x2a 0
"VK_CONTROL" VK_LCONTROL 0xA2 0x1d 0
"VK_MENU" VK_LMENU 0xA4 0x38 0
To switch to a predefined definition, press the bezel keys CTRL, SHIFT, and a number between 1 and 5
inclusive. The three bezel keys must be pressed without releasing any before all three are pressed. If this
occurs, release all three bezel keys and start over.
Driver Messages
If a debugger is connected to the Windows 2000 or Windows XP some diagnostic messages can be
captured that are emitted by the driver. The driver does not write any messages to any of the system logs.
Listing the steps necessary to connect a debugger to the VersaView computer is beyond the scope of this
document. The steps can be found on the Microsoft web site. Basically on the VersaView add the
following line to the hidden boot.ini file in the root. Add it to one of the boot choices.
Prints out the name, version, and date of build of the driver.
"Rockwell Automation Keypad Filter; Version 1.0; " __DATE__ " " __TIME__ "\r\n"
Related to contents (or lack thereof) of configuration information read from the Registry.
"Found and using valid data from KCU\r\n"
"Warning: VirtualKey name in Registry not recognizable!\r\n"
"Found %d valid configurations for keys\r\n"
"Warning no valid configurations found for keys!\r\n"
"Failed, no subkeys in ConfigTable, defaulting to 6180W mappings\r\n"
"Failed to query Configtable Registry key, defaulting to 6180W mappings\r\n"
"Failed to open ConfigTable Registry key, defaulting to 6180W mappings\r\n"
"Warning: Entry ignored, did not recognize VK Key: "
"Warning: Could not translate VK %02xh to MakeCode. Entry ignored!\r\n"
The blue keys (A, K, F, and alpha) are straightforward and not listed in the table. See VK Code and
Scancode Mappings for values for them. For the table the gray keys are numbered from upper left going
across and down. The two brightness keys at the bottom are not detected by the driver. So the 7 key
would be row 1 in the table, the NUMLOCK would be 17, the Up Arrow would be 27, and the Left
Arrow would be 28.
To filter all keyboards (including USB and the bezel keypad), alter the Registry as follows:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-
E325-11CE-BFC1-08002BE10318}]
"UpperFilters"="keypadfilter\0kbclasss\0\0"
The Registry Value is REG_MULTI_SZ so it doesn't actually look quite like that. It is very critical that the
keypadfilter driver is installed before the kbdclass driver.
Safe Mode
The Keypad Filter Driver is loaded in Safe Mode.
Driver Signing
The Keypad Driver is not signed by Microsoft.