Hagstrom Electronics KE72-T User manual

KE72 and KE72-T
PC Keyboard Encoder
User Manual
Toll Free 888-690-9080
Phone: (540) 465-4677 Fax: (540) 465-4678
Monday through Friday, 8:00 am to 5:00 pm (EST)
www.hagstromelectronics.com
1986 Junction Road, Strasburg, VA 22657
Copyright © 2016 HAGSTROM ELECTRONICS, INC.
V. 08.16
HAGSTROM
ELECTRONICS, INC.

Warranty
HAGSTROM ELECTRONICS, INC. warrants this
product against defects in material or workmanship for a
period of ONE YEAR fromtheoriginal purchase date. We will
repair or replace (at our option) thereturned defective unit
at no charge during this warranty period.
No responsibility is assumed for any special, incidental,
or consequential damage resulting fromthe use ofor
inability to use this product. In no case is HAGSTROM
ELECTRONICS, INC. to be liable for any amount which
exceeds thepurchase price ofthe unit, regardless ofthe
claim.
No other warranty, written or verbal, is authorized. This
warranty is applicable only to units sold inthe United States.
Units sold outside the United States are covered by a similar
warranty.
Depending on the state in which you live, you may have additional rights.
Great care has been taken during the assembly, testing, and burn-in
of your KE72 to ensure itsperformance. If youhave any questions,
please send us an email or give us a call. Support is available Monday
through Friday, 8:00 am to 5:00 pm (EST).
Call Toll Free 888-690-9080, or (540) 465-4677
NOTICE: The KE72 product is designed to be used by technically
oriented computer users. When the KE72 is in use, your computer’s
signals and voltages are present on the unit. Prudent handling and
packaging is necessary to prevent damage to your computer.
Your keyboard encoder is designed for OEM use, and is not FCC part 15 approved. Because
the packaging and use oftheproduct will directly affect the characteristics ofthe unit, it isthe
responsibility of the purchaser to obtain final approval of their application, if required.
PS/2 is a Trademark of International Business Machines.
Thank you for purchasing the model KE72 Keyboard Encoder.
HAGSTROM ELECTRONICS, INC.
is pleased that you have selected this product for your application.
The KE72 unit is configurable in a variety of ways in order to
meet your specific requirements. Please take a few minutes to
read this manual before using your KE72.
In addition to this printed manual, other resources are included
with the product CD which provide information and tips on using
the KE72 and making the most of it’s features.
If you have any questions about the use of the KE72 not covered
in this manual, please contact us directly. We offer toll free
technical product support from 8:00am to 5:00pm M-F Eastern
Time 888-690-9080. You may also send an email to
We respond to all email requests within one business day.

Custom KE72 Options
We offer custom and special modifications to our standard KE72
unit to conform to your exact specifications. We can add special
features such as output controls and display interfaces, just to
name a few. Give us a call to discuss your custom requirements.
Special Output Controls
LCD Interface
LED Interface
Rotary Switch Inputs
MIDI Output
Questions or Comments?
Please give us a call!
Toll Free
888-690-9080
or visit us on the web
www.hagstromelectronics.com
email: sales@hagstromelectronics.com
25
CONTENTS
Introduction to the KE72
Connection to the Computer
Interfacing to the KE72 Input Headers
Creating a KE72 Configuration File
Special Programming Options
Loading a Configuration File to the KE72
Using the KE72 Serial Port
Appendix A - Specifications
Appendix B - KE72 Input Interface
Appendix C - KE72 Status LED Signals
Appendix D - KE72-T Interface to Trackball
Appendix E - KE72 Serial Connector Pinout
Appendix F - Key Number Chart
Accessories
Custom Options
3
4
5
7
12
14
16
19
20
21
22
22
23
24
25
2

IOX36
Input Header to screw terminal
breakout board. This product connects
to the KE72
input header
through a
standard
IDE cable (included). Each input
is brought out to a separate,
labeled, screw terminal. Use for
solderless connection to the KE72
and KE72-T.
24
KE-TBH3
Trackball interface cable. This cable attaches the
KE72-T Trackball input to the Trackball itself.
Accessories
We offer several accessories for use with the KE72.
Introduction to the KE72
The KE72 Keyboard Encoder is a product designed to interface
switches or keypads to the computer’s PS/2 keyboard port. The
KE72 appears as a keyboard to your computer system (and also
a mouse with the KE72-T). The response to the activation of any
of the 72 Individual inputs on the KE72 may be programmed
to emulate a key or sequence of keys found on a standard PC
keyboard.
The KE72-T features a trackball interface port which allows
connection of the optical signals from a trackball to the unit. The
signals received on this port are converted into mouse movement
on the PC.
The KE72 uses standard drivers for its functions. No special software
is required for the unit to work with your PC. Once programmed,
the KE72 can be used with any PC compatible operating system.
3
KE72 Input Header 1 - Connection to
inputs 1-36 and logic Ground
KE72 Input Header 2 - Connection to
inputs 37-72 and logic Ground
NOTE: KE72 can be mounted in your PCI slot, or as a stand
alone unit. The PCI form factor is for mounting purposes only.
There are no PCI bus electrical connections.
Connection to
PC, Keyboard,
serial port and
PS/2 mouse
port
Mouse button
connections for
KE72-T only
Trackball
connection for
KE72-T only
KE-MM6-mini
6 Ft. Male/Male miniDIN Cable
Use this cable to connect the
KE72 to the PC keyboard port.
The KE72-T requires an additional
KE-MM6-mini style cable to
connect from the KE72-T to the
PC Mouse port.

23
Key Make Break
~` 01 129
1! 02 130
2@ 03 131
3# 04 132
4$ 05 133
5% 06 134
6^ 07 135
7& 08 136
8* 09 137
9( 10 138
0) 11 139
-_ 12 140
=+ 13 141
BS 15 143
Tab 16 144
Q 17 145
W 18 146
E 19 147
R 20 148
T 21 149
Y 22 150
U 23 151
I 24 152
O 25 153
P 26 154
[{ 27 155
]} 28 156
\| 29 157
Caps 30 158
A 31 159
S 32 160
D 33 161
F 34 162
G 35 163
H 36 164
Appendix F:
Key Number Table
Key Make Break
J 37 165
K 38 166
L 39 167
;: 40 168
‘“ 41 169
Enter 43 171
L Shift 44 172
Z 46 174
X 47 175
C 48 176
V 49 177
B 50 178
N 51 179
M 52 180
,< 53 181
.> 54 182
/? 55 183
R Shift 57 185
L Ctrl 58 186
L Alt 60 188
Space 61 189
R Alt 62 190
R Ctrl 64 192
L Win 70 198
R Win 71 199
Win APL 72 200
Insert 75 203
Delete 76 204
L Arrow 79 207
Home 80 208
End 81 209
Up Arrow 83 211
Dn Arrow 84 212
Page Up 85 213
Page Dn 86 214
Key Make Break
R Arrow 89 217
NumLock 90 218
7 (Num) 91 219
4 (Num) 92 220
1 (Num) 93 221
/ (Num) 95 223
8 (Num) 96 224
5 (Num) 97 225
2 (Num) 98 226
0 (Num) 99 227
* (Num) 100 228
9 (Num) 101 229
6 (Num) 102 230
3 (Num) 103 231
. (Num) 104 232
- (Num) 105 233
+ (Num) 106 234
Enter (Num) 108 236
Esc 110238
F1 112240
F2 113241
F3 114242
F4 115243
F5 116244
F6 117245
F7 118246
F8 119247
F9 120 248
F10 121 249
F11 122 250
F12 123 251
Prt Scr 124 252
Scrl Lk 125 253
Pause/Break 126 ------
When sending data to the KE72 serial port in key number mode, use
the values shown to produce the “make” and “break” code for the
corresponding key.
The Pause Key has no Break Code
Connection to your Computer
The KE72 attaches in line between the PC and the system keyboard.
Use a standard Male/Male PS/2 type connecting cable from the
KE72 connector marked “PC” to the PS/2 keyboard port on the
computer. Plug the system keyboard into the KE72 port marked
“KBD”. The KE72-T additionally connects to the computer’s PS/2
mouse port with the same Male/Male PS/2 style cable. Use
the serial port on the KE72 for serial data to keystroke translation
or for serial loading of the KE72 configuration.
Note: Make connections to the KE72 with power off.
The KE72 is powered directly from the keyboard port, no external
power is required. The KE72 may be powered remotely if used in an
RS-232 only application where no connection to the PC keyboard
port is made. See Appendix C for remote power connections.
TO Keyboard Port on PC
From External Keyboard
TO PS/2 Mouse Port on PC
(KE72-T Only)
RS-232 Serial Port
4

22
Appendix D:
KE72-T to Trackball
The KE72-T features an interface connector which accepts optical
signals from a device such as a Spinner or a Trackball. Power
is supplied to the trackball interface from the KE72-T for 5 volt
operation only. This interface is compatible with most popular
active or passive Trackballs and Spinners currently on the market.
Use our KE-TBH3 cable to connect from the KE72-T directly to a
Trackball or use the diagram below to make a connecting cable.
The KE72-T also provides a header for connection of buttons to
emulate the Left, Right and PS/2 Middle Mouse buttons.
Appendix E:
KE72 Serial Connector Pinout
The KE72 serial port is an RS232 connection. The pinout of the
DB9 female connector on the KE72 is as defined below.
KE72-T - Trackball and Mouse button Interface signal assignments.
Note: Do not supply any power into the Trackball or Mouse Button interface connector.
A1 = Y axis signal
5V = Power for Y axis
GND = Ground for Y axis
B1 = Y axis signal
A2 = X axis signal
5V = Power for X axis
GND = Ground for X axis
B2 = X axis signal
Right Mouse Button
Middle Mouse Button
Left Mouse Button
Logic Ground
PIN 2
TXD
PIN 3
RXD
GND
The KE72 serial port requires connection
only to the three pins shown. TXD is RS-
232 serial data out of the port and RXD
is RS-232 data into the KE72. This pin
arrangement allows for use of a Male/
Female stright through cable to connect
the KE72 to a standard PC com port.
5
Interfacing to the KE72 Input Headers
The KE72 features two 2x20 headers for interface to switch input
devices. One header provides access to inputs 1-36, while the
second header contains inputs 37-72. The input headers are
arranged with Grounds on the two pairs of end pins on the
headers, and the 36 inputs on the pins between them. The board
is labeled near each header pin, designating the input number
that the pin represents. Each of the pins may be programmed to
emulate any standard PC keyboard key or key sequence.
Inputs on the KE72 header are activated by shorting them through
a switch to any one of the provided logic Grounds on the header.
When activated, the input will report the keystroke or keystrokes
that it has been programmed to emulate. If held active, the
keystroke response will repeat (if programmed to repeat), based
on the repeat rates and delays set within the PC operating system.
KE72 inputs may be programmed to send keystrokes when the
input is activated, deactivated, or at both times. The repeat of
a key or key sequence is a selectable option for each input in a
KE72 configuration file.
The inputs are intended to handle mechanical switch inputs and
are debounced for that purpose. Logic drivers may be attached
to the inputs as well, provided they are an active low, logic level
signal. Refer to Appendix A on specifications for the timing of
logic signals. NOTE: Never attach any external power to the Inputs.
The KE72 input headers are dual row headers with .100” spaced
pins. This format is suitable for many readily available connectors
on the market, including a typical IDE hard drive cable. Since all the
inputs are activated by the same logic Ground, this Ground may
be “daisy chained” to the Ground of all of the input switches.

Appendix C:
KE72 Status LED Signals
Keyboard status light drive is available with the KE72. The unit
provides a connection point for the Num Lock, Caps Lock, and
Scroll Lock status LEDs.
The signals present on the KE72 require a 470 Ohm 1/4 Watt
resistor in series with the signal and the LED from the KE72. The
KE72 LED signals are active low when the LED is to be lit.
Attach the anode side of the LED to the 5V source on the header
and attach the cathode leg of the LED to one end of the 470 Ohm
resistor. Connect the other end of the resistor to the signal from
the KE72.
Note that in a stand alone serial application (No connection to
PC KBD or Mouse Port), a regulated 5V supply must be used with
the unit. The 5V supply may be attached to the 5V and GND pins
shown in the diagram above.
21
GND Scroll Num Caps unused 5V
Typical LED Circuit for use with the KE72 5V
470 Ohm
KE72 LED Signal (Caps, Num, or Scroll)
6
We also offer a breakout board for screw terminal access to the
KE72 input headers (our part number IOX36). This interface board
attaches to the KE72 headers through an IDE cable (provided with
the IOX36). See the Accessories page of this manual for details
on the IOX36.
The KE72-T features an Input Header for connection of a Trackball
or Spinner. The KE72-T also provides a header for connection
of buttons to emulate the Left, Right and Middle PS/2 Mouse
buttons.
The four position header shown is for connection of switches to
emulate the mouse buttons. These inputs are activated by shorting
them to the supplied logic Ground.
The eight position header on the KE72-T is for connection of
a Trackball or Spinner. Use our KE-TBH3 cable to connect the
Trackball or create a cable using the signals as shown. Power is
supplied to the Trackball device from this header.
NOTE: Never connect an externally powered device to the Trackball header or
Mouse Button interface connector.
The KE72-T Trackball header accepts input from active or passive
drive Trackballs or Spinners.
KE72-T - Trackball and Mouse button Interface signal assignments.
Note: Do not supply any power into the Trackball or Mouse Button interface connector.
A1 = Y axis signal
5V = Power for Y axis
GND = Ground for Y axis
B1 = Y axis signal
A2 = X axis signal
5V = Power for X axis
GND = Ground for X axis
B2 = X axis signal
Right Mouse Button
Middle Mouse Button
Left Mouse Button
Logic Ground

Appendix B:
KE72 Input Interface
The KE72 is configured as 72 individual inputs, which are
activated by shorting them to the common Ground provided
on the input headers. Since these inputs are individual, they are
completely separate, and cannot produce “ghosting” as in a
matrix application. The KE72 inputs are debounced for use of
mechanical switches for input to the header.
KE72 Inputs may also be driven from logic gate outputs, provided
they do not drive voltage above the 5V supply on the unit. The
logic signals must produce an active logic low signal for the
appropriate amount of time as listed in Appendix A.
The recommended maximum cable length from the KE72
input header to the input devices is 10 feet. The recommended
maximum cable length of the PS/2 cable from the PC to the KE72
is 10 feet.
Note: The KE72 allows any number of the 72 inputs to be activated
simultaneously. The responses to each input will be processed in the order they
are detected.
Ground
Input 1
Input 2
Pushbutton
Pushbutton
KE72 Header Connection
7
Creating a KE72 Configuration File
The KE72 is programmed by a configuration file which is a simple
text file created by the user that tells the unit what responses to
generate for activity on each of the KE72 inputs. This configuration
file is loaded into the KE72 by use of the utlility programs included
with the KE72 and detailed in the next section of the manual.
Responses assigned to an input may be a single keystroke, or a
series of keystrokes, making the KE72 a very powerful and flexible
unit. The rules of creating the text file for the KE72 are simple and
versatile. The following examples demonstrate the text required in
the configuration file to define the response of an input.
Each input definition line begins with INXX:, where XX is a two
digit decimal number between 01 and 72. This number indicates
which input the line refers to for the keystroke response. The
keystroke definition for an input is generally encased by square
brackets [ ].
Example Configuration Lines:
IN01:[A]
The line above will program input #1 to produce the “A” keystroke
when the input is activated.
IN22:[F1]
The above text will program input #22 to emulate the F1 key.
IN63:[Home]
The line above will program input #63 to emulate the Home
key.
In addition to emulating a single keystroke, an input may be
programmed to produce a sequence of keystrokes as well. The
Electrical connection example for switches to KE72 inputs.
20
Com
Com
N.O.
N.O.

8
following line demonstrates programming a multiple key response
to an input.
IN43:[D] [I] [R] [ENTER]
The above line in the text file will program input #43 to send a
sequence of “DIR” followed by the Enter key each time the input
is activated.
IN02:[A]
IN02|[J]
Inputs may also be programmed to send a response when the in-
put is de-activated as well as when the input is activated. The line
above will program input #2 to send an “A” key when the input is
activated and a “J” key when the input is released.
NOTE: The | character is used after the input number to define the
response for the input when it is deactivated.
IN03|[G]
Using the line above in a configuration file will set input #3 to
send the “G” key when the input is de-activated. No response will
be generated by input #3 when it is activated when programmed
as shown.
There are several delimeters that may be used in the KE72 text file
to futher define the character response. The following is a list of
these delimeter options with examples for each.
(+) This option indicates that a “make” or press of the key only
is to be done. Use this function to give the appearance of a key
being held down.
ex: [(+)Ctrl] will emulate the press of the Ctrl key. Always be sure
to send a release of any key that has been sent as a make only.
(see the next example of the (-) key release option.)
Appendix A:
Specifications
Operating Voltage5 Volts DC +/-5%, Supplied from PS/2
port.
Operating Current 80 ma Typical
Operating
Temperature
0 to 70 Degrees C
Input Header 72 individual inputs divided between
two 2 x 20 headers. .025” square pins
spaced at .100”
Required Input
Current
1.2 ma sink current typical
Input Active Time The input must be active for at least 20
msec to be considered valid.
5.50
.125
Dia (4)
Note: All dimensions are in inches.
19
4.20

(-) This option indicates that a “break” or release of the key is to
be done. Use this function to give the appearance of a key being
released.
ex: [(-)Ctrl] will emulate the deactivation of the Ctrl key.
Using the (+) and (-), the following line,
IN01:[(+)Ctrl] [F1] [(-)Ctrl]
will result in the Ctrl key being held on, the F1 key being pressed
and released, followed by the release of the Ctrl key.
(N) Use this option to designate the key to be emulated is from
the numeric keypad section of the keyboard.
ex: IN01:[(N)1] is used to emulate the “1” key from the “1/
End” key from the numeric keypad section of the keyboard instead
of the “1!” key from the top of the keyboard.
(~) This option is used to designate case sensitivity on an alpha
character.
ex: IN01:[(~)A] can be used to always emulate a capital A
regardless of the current Shift and Caps Lock states.
(D) Use this option within the key sequence to suspend the KE72
and delay during the output sequence. This function is always
followed by a value which specifies a delay time X .01 seconds.
NOTE: The maximum value allowed with the (D) delay command is 250.
ex: IN01:[(D)200] will execute a 2 second delay (200 X .01)
Delay statements can be cascaded to produce longer delays [(D)220][(D)150]
<R> This option is used when the input response is to be repeated
when the input is held active. The <R> must be the first text
following the : or | character on the input definition.
ex: IN70:<R>[A] will allow the “A” key response to repeat
9
the 0XC5 command represents the state of the first 8 inputs (bit 0
= Input1, bit 1 = Input2.....), and the second byte is the state of
inputs 9-16 etc. The 9th byte sent in response to the command is
the status of inputs 65-72 (Bit 7 = Input 72 state). A value of 1 in
a bit position indicates that the particular input is activated. The
status of the inputs is always available using the 0XC5 command
independent of whether inputs are programmed to respond with
keystrokes or serial data.
0X7F - Status LED Read Command. Sending 0X7F to the KE72
serial port results in the return of a character in the range of ASCII
“0” - “7”. The KE72 response character reflects the current state
of the Caps Lock, Num Lock, and Scroll Lock LEDs.
“0” - No LEDS On
“1” - Scroll Lock LED on only
“2” - Num Lock LED on only
“3” - Scroll Lock LED and Num Lock LED on
“4” - Caps Lock LED on only
“5” - Caps Lock LED and Scroll Lock LED on
“6” - Caps Lock LED and Num Lock LED on
“7” - Caps Lock, Scroll Lock, Num Lock LED all on
The serial port on the KE72 may additionally be used to load a
configuration file into the KE72 as described in the “Loading a
Configuration File to the KE72” section of the manual. When
loading the configuration from the serial port, the PC running the
load program can be a different machine than the one which has
the KE72 attached to it’s keyboard port.
18

while the input is held active. The rate at which the input will
repeat is the same rate dictated by the system to the keyboard.
<S> Use this delimeter to send the input response to the serial
port instead of emulating keystrokes. The sample.txt file included
on the KE72 CD provides extended examples of the serial port
function. The <S> option must follow the : or | character on the
input definition line.
ex: IN05:<S>[F] will send an ASCII “F” out of the KE72 serial
port when the input #5 is activated. In addition to an ASCII
character, a numeric value may be specified for the byte to be
sent. ex: IN05:<S>[220] will send a one byte value of 0xDC.
Inputs on the KE72 may be programmed to send up to 32 keystrokes
when activated, and up to 16 when the input is released.
example:
IN28:[p][r][e][s][s][e][d] Types “pressed” when input 28 activates
IN28|[r][e][l][e][a][s][e][d] Types “released” when input 28 deactivates
The key to be emulated is always inserted between square
brackets. The following list summarizes the associated key names
for keystrokes that are used in a KE72 Configuration File. All
other keys are represented by their direct equivalent (ex: A = A
key, B = B Key, etc.)
[Shift] = Left Shift [LShift] = Left Shift
[RShift] = Right Shift [Ctrl] = Left Ctrl
[LCtrl] = Left Ctrl [RCtrl] = Right Ctrl
[Alt] = Left Alt [LAlt] = Left Alt
[RAlt] = Right Alt [Esc] = Escape
[F1] = F1 key [F2] = F2 key
[F3] = F3 key [F4] = F4 key
[F5] = F5 key [F6] = F6 key
10
message to prevent a stuck key. The KE72 responds with a
“!” character after each byte is received in this mode. Always
wait for the “!” acknowledgement before sending additional
communication to the serial port.
NOTE: Serial data in and out of the KE72 serial port is always at 9600 Baud, 8
bit characters, No Parity, andone stop bit. No hardware handshaking is used.
Custom versions are available, please contact us with your requirements.
0xC2 - Use this one byte command to set the serial translation
mode to ASCII to Keystroke. This mode is also the default mode
at power on or reset. The KE72 responds with “!” to acknowledge
receipt of this command.
0xC3 - This command will set the KE72 serial translation mode
in Key Number to Keystroke. While in this mode, a single byte is
sent to the KE72 serial port which corresponds to the up or down
state of a particular key. Once this command byte is received by
the KE72, the serial mode will be in the key number mode until
changed by the 0xC2 command, a reset to the PC occurs, or the
PC is powered down and back up. The KE72 acknowledges re-
ceipt of this command with the “!” character.
0XC4 - Use this command to poll the KE72 for the current se-
rial translation mode. When the KE72 receives this command,
a character is returned by the KE72 which indicates the current
serial to keystroke mode.
”1” (0x31) is returned in response to the 0XC4 command if the KE72 is
operating in the ASCII to Keystroke mode.
“2” (0X32) is returned in response to the 0XC4 command if the KE72 is
operating in the Key Number to Keystroke mode.
0XC5 - Input state command. When this serial command is
received by the KE72, a string of 9 bytes are transmitted on the
serial port which indicate the current debounced status of each of
the 72 inputs on the KE72. The first byte returned in response to
17

[F7] = F7 key [F8] = F8 key
[F9] = F9 key [F10] = F10 key
[F11] = F11 key [F12] = F12 key
[Space]= Space Bar [ ] = Space Bar
[Print] = Print Screen [Scroll] = Scroll Lock
[Pause]= Pause/Break [Num] = Num Lock
[Insert] = Insert Key [Home]= Home key
[PageUp]= Page Up [PageDn]= Page Down
[Delete]= Delete key [End] = End key
[Up] = Up Arrow [Down]= Down Arrow
[Left] = Left Arrow [Right] = Right Arrow
[LWin] = Left Windows [RWin] = Right Windows
[Win] = Win Apl [Enter] = Enter
[BS] = Backspace [CAPS] = Caps Lock
[Tab] = Tab key [(N)1] = 1/End
[(N)2] = 2/Down [(N)3] = 3/PgDn
[(N)4] = 4/Left [(N)5] = 5
[(N)6] = 6/Right [(N)7] = 7/Home
[(N)8] = 8/Up [(N)9] = 9/PgUp
[(N)0] = 0/Ins [(N).] = ./Del
[(N)Enter]= Enter [(N)+] = +
[(N)-] = - [(N)*] = *
[(N)/] = /
Note: the (N) with a key definition indicates that the key being
emulated is the one from the numeric keypad section of the key-
board.
When saving a configuration file, it must be saved as a text file only.
The text file can be created from virtually any document editing
program. The file type to use for saving is typically referred to as
a “.txt” file in ANSI format or “ASCII DOS Text” depending on the
program used to create the file. Refer to the sample configuration
file on the CD included with the KE72.
11
Using the KE72 Serial Port
Responses from the activation of inputs may be directed to the
serial port instead of producing keystrokes as described in the
earlier configuration file section. In addition to that function, the
KE72 serial port may be used in several other modes as well.
Serial Data to Keystroke Modes -
The KE72 features two different serial data to keystroke conversion
modes. One mode accepts direct ASCII characters while the
second mode accepts “key numbers” which command the up and
down state of any key. The ASCII mode is the default mode at
power up and reset, but the mode may be changed and identified
by special one byte serial commands shown later in this section.
The ASCII to Keystroke mode will accept printable ASCII
characters and translate them into keystrokes on the PC. If an
ASCII “A” is sent to the serial port, the KE72 will produce the
required keystrokes to produce an upper case “A”. The KE72
responds with a “!” character after each byte is received in this
mode. Always wait for the “!” acknowledgement before sending
additional communication to the serial port. Any characters sent to
the KE72 which are not printable ASCII characters are ignored.
The Key Number to Keystroke modea l lows the commanding
of the up and down state of any key on the keyboard. In this
mode, each key on the keyboard is represented by a number (See
Appendix F for the key number table). Sending the key number to
the serial port results in a “down” key state for the corresponding
key. Sending the same code +128 decimal results in the “key
up” message being generated for that key. Use this key number
mode to emulate keystrokes and keystroke combinations such as
Ctrl+F1, etc. Note that “key down” refers to the press of a key
and “key up” refers to the release of a key. Always send a key up
message for a key that had previously been sent as a key down
16

Special Programming Options
The KE72 features several special commands that may be included
in the configuration file to dictate the way inputs react and how the
Trackball interface is treated in the model KE72-T. These special
commands may be placed anywhere within the configuration file
and in any order.
Input Preload Option - PREL:Y or PREL:N
If this line is present in the configuration file, the KE72 will ignore
any switches that are on at power up or reset if the Y setting is
used. Having inputs on at power up may cause keyboard error
messages on some PCs. With this option set to Y, an active input
at power on is ignored until it is deactivated. At this point, the
input will respond normally when activated and deactivated. Note
that not specifying this setting in the configuration file is the same
as stating PREL:N.
The KE72-T Trackball header accepts a wide variety of Trackball
devices. In order to provide the most in the way of compatibility,
the KE72-T allows for the reversal of the direction of movement
from either the “X” (side to side) axis and the “Y” (up and down)
axis through simple settings in the configuration file.
Trackball X direction reversal (KE72-T only) - REVX:Y
The reported direction of the X axis of the trackball may be reversed
by including a line REVX:Y in the configuration file. If this option is
not specified, that is the same as defining REVX:N.
Trackball Y direction reversal (KE72-T only) - REVY:Y
The reported direction of the Y axis of the trackball may be reversed
by including a line REVY:Y in the configuration file. If this option is
not specified, that is the same as defining REVY:N.
12
Example: KE72LOAD sample.txt k
The command line above will load the configuration contained in
the file “sample.txt” to the KE72 through the PC keyboard port.
The options for <port> are the following:
k - Keyboard port
1 - Use Com 1 to load the configuration
2 - Use Com 2 to load the configuration
3 - Use Com 3 to load the configuration (Win version)
4 - Use Com 4 to load the configuration (Win version)
5 - Use Com 5 to load the configuration (Win version)
6 - Use Com 6 to load the configuration (Win version)
Note that for loading through the serial port a Male/Female
straight through cable must be used to connect from the KE72
serial port to the Com port of the PC where the program is being
run. While loading from a command line, a series of “.......”
characters are sent which indicate the progress of the loading.
The /e option suppresses the confirmation “.......” characters sent
as progress indicators when loading from a command line. Error
messages will still be shown if they occur during loading.
The /h option is the same as the /e option except that error
messages are supressed as well.
The /r option reads the current KE72 configuration instead of
loading the configuration. The configuration currently residing in
the KE72 is written to the file named in the command line.
Example: KE72LOAD current.txt 5 /r
Will read the configuration from the KE72 using Com 5 and create
a file named “current.txt” which will hold the text representation of
the configuration.
15

The mouse resolution setting (KE72-T only) -
The Trackball section of the KE72-T emulates a standard PS/2
mouse. The typical drivers on the PC will dictate the resolution
parameters for the PS/2 mouse. The KE72-T can be set to ignore
the resolution parameters given by the system and stay in the
resolution set by the MSET command. There are four settings
which may be programmed for this resolution option.
MSET:n (Where n = 0,1,2, or 3)
Setting 0 = Lowest resolution (least amount of movement per input)
Setting 1 =
Setting 2 =
Setting 3 = Highest resolution (most amount of movement per input)
Note that when this MSET programming option is not included in
the configuration, the resolution is automatically adjusted by the
system’s mouse driver.
Sample KE72 Configuration File
This is a sample configuration file for the KE72. Note that comments may be used in
the configuration file, as in this paragraph. Comments may also follow a command
string on the same line as shown below.
PREL:Y Use the preload option to suppress response to inputs that are on at power
up.
IN01:[D] Program input 1 to emulate the D key
IN02:[F1] Make input 2 the F1 key
IN22:[(+)Ctrl][F2][(-)Ctrl]
Program input 22 to emulate a Ctrl+F2 function
IN56:<R>[M] Repeat the M key if the input is held active
IN06:[G] Input definitions can be in any order.
IN06|[H] Set input 6 to send G when activated and H when released
REVX:Y Reverse the response of the X axis of the Trackball for the KE72-T
End of File
13
Loading a Configuration File to the KE72
The KE72 is supplied with two load programs. The KE72LOAD.EXE
found in the root folder of the supplied CD is for use in Windows
based operating systems. The KE72LOAD.EXE file found in the
KE72DOS folder is used for DOS based systems.
To run the programs, the contents of the CD should be copied to
a folder on the hard drive. Store the CD for a backup copy of the
load program.
Prior to running the KE72LOAD.EXE a configuration text file must
be created as described in the earlier section.
The KE72LOAD.EXE program may be run by selecting the file
directly and running it, or it may be run as a command line with
options. When run with no command line options, the program
will prompt the user for the configuration file to be loaded as well
as the port to load through to the KE72.
The KE72 may be programmed through the keyboard port, or
through the serial port. When programming through the serial
port, the programming application may be run from the PC where
the KE72 is attached, or a different PC that has it’s Com port
attached to the KE72 serial port.
The syntax for loading the KE72 through the command line:
KE72LOAD <filename> <port> </r> </e> </h>
Where <filename> is the name of your KE72 configuration file,
and the <port> is the port to use for programming the KE72.
The /r,/e, and /h options apply to the Windows program only and
are optional parameters.
14

The mouse resolution setting (KE72-T only) -
The Trackball section of the KE72-T emulates a standard PS/2
mouse. The typical drivers on the PC will dictate the resolution
parameters for the PS/2 mouse. The KE72-T can be set to ignore
the resolution parameters given by the system and stay in the
resolution set by the MSET command. There are four settings
which may be programmed for this resolution option.
MSET:n (Where n = 0,1,2, or 3)
Setting 0 = Lowest resolution (least amount of movement per input)
Setting 1 =
Setting 2 =
Setting 3 = Highest resolution (most amount of movement per input)
Note that when this MSET programming option is not included in
the configuration, the resolution is automatically adjusted by the
system’s mouse driver.
Sample KE72 Configuration File
This is a sample configuration file for the KE72. Note that comments may be used in
the configuration file, as in this paragraph. Comments may also follow a command
string on the same line as shown below.
PREL:Y Use the preload option to suppress response to inputs that are on at power
up.
IN01:[D] Program input 1 to emulate the D key
IN02:[F1] Make input 2 the F1 key
IN22:[(+)Ctrl][F2][(-)Ctrl]
Program input 22 to emulate a Ctrl+F2 function
IN56:<R>[M] Repeat the M key if the input is held active
IN06:[G] Input definitions can be in any order.
IN06|[H] Set input 6 to send G when activated and H when released
REVX:Y Reverse the response of the X axis of the Trackball for the KE72-T
End of File
13
Loading a Configuration File to the KE72
The KE72 is supplied with two load programs. The KE72LOAD.EXE
found in the root folder of the supplied CD is for use in Windows
based operating systems. The KE72LOAD.EXE file found in the
KE72DOS folder is used for DOS based systems.
To run the programs, the contents of the CD should be copied to
a folder on the hard drive. Store the CD for a backup copy of the
load program.
Prior to running the KE72LOAD.EXE a configuration text file must
be created as described in the earlier section.
The KE72LOAD.EXE program may be run by selecting the file
directly and running it, or it may be run as a command line with
options. When run with no command line options, the program
will prompt the user for the configuration file to be loaded as well
as the port to load through to the KE72.
The KE72 may be programmed through the keyboard port, or
through the serial port. When programming through the serial
port, the programming application may be run from the PC where
the KE72 is attached, or a different PC that has it’s Com port
attached to the KE72 serial port.
The syntax for loading the KE72 through the command line:
KE72LOAD <filename> <port> </r> </e> </h>
Where <filename> is the name of your KE72 configuration file,
and the <port> is the port to use for programming the KE72.
The /r,/e, and /h options apply to the Windows program only and
are optional parameters.
14

Special Programming Options
The KE72 features several special commands that may be included
in the configuration file to dictate the way inputs react and how the
Trackball interface is treated in the model KE72-T. These special
commands may be placed anywhere within the configuration file
and in any order.
Input Preload Option - PREL:Y or PREL:N
If this line is present in the configuration file, the KE72 will ignore
any switches that are on at power up or reset if the Y setting is
used. Having inputs on at power up may cause keyboard error
messages on some PCs. With this option set to Y, an active input
at power on is ignored until it is deactivated. At this point, the
input will respond normally when activated and deactivated. Note
that not specifying this setting in the configuration file is the same
as stating PREL:N.
The KE72-T Trackball header accepts a wide variety of Trackball
devices. In order to provide the most in the way of compatibility,
the KE72-T allows for the reversal of the direction of movement
from either the “X” (side to side) axis and the “Y” (up and down)
axis through simple settings in the configuration file.
Trackball X direction reversal (KE72-T only) - REVX:Y
The reported direction of the X axis of the trackball may be reversed
by including a line REVX:Y in the configuration file. If this option is
not specified, that is the same as defining REVX:N.
Trackball Y direction reversal (KE72-T only) - REVY:Y
The reported direction of the Y axis of the trackball may be reversed
by including a line REVY:Y in the configuration file. If this option is
not specified, that is the same as defining REVY:N.
12
Example: KE72LOAD sample.txt k
The command line above will load the configuration contained in
the file “sample.txt” to the KE72 through the PC keyboard port.
The options for <port> are the following:
k - Keyboard port
1 - Use Com 1 to load the configuration
2 - Use Com 2 to load the configuration
3 - Use Com 3 to load the configuration (Win version)
4 - Use Com 4 to load the configuration (Win version)
5 - Use Com 5 to load the configuration (Win version)
6 - Use Com 6 to load the configuration (Win version)
Note that for loading through the serial port a Male/Female
straight through cable must be used to connect from the KE72
serial port to the Com port of the PC where the program is being
run. While loading from a command line, a series of “.......”
characters are sent which indicate the progress of the loading.
The /e option suppresses the confirmation “.......” characters sent
as progress indicators when loading from a command line. Error
messages will still be shown if they occur during loading.
The /h option is the same as the /e option except that error
messages are supressed as well.
The /r option reads the current KE72 configuration instead of
loading the configuration. The configuration currently residing in
the KE72 is written to the file named in the command line.
Example: KE72LOAD current.txt 5 /r
Will read the configuration from the KE72 using Com 5 and create
a file named “current.txt” which will hold the text representation of
the configuration.
15

[F7] = F7 key [F8] = F8 key
[F9] = F9 key [F10] = F10 key
[F11] = F11 key [F12] = F12 key
[Space]= Space Bar [ ] = Space Bar
[Print] = Print Screen [Scroll] = Scroll Lock
[Pause]= Pause/Break [Num] = Num Lock
[Insert] = Insert Key [Home]= Home key
[PageUp]= Page Up [PageDn]= Page Down
[Delete]= Delete key [End] = End key
[Up] = Up Arrow [Down]= Down Arrow
[Left] = Left Arrow [Right] = Right Arrow
[LWin] = Left Windows [RWin] = Right Windows
[Win] = Win Apl [Enter] = Enter
[BS] = Backspace [CAPS] = Caps Lock
[Tab] = Tab key [(N)1] = 1/End
[(N)2] = 2/Down [(N)3] = 3/PgDn
[(N)4] = 4/Left [(N)5] = 5
[(N)6] = 6/Right [(N)7] = 7/Home
[(N)8] = 8/Up [(N)9] = 9/PgUp
[(N)0] = 0/Ins [(N).] = ./Del
[(N)Enter]= Enter [(N)+] = +
[(N)-] = - [(N)*] = *
[(N)/] = /
Note: the (N) with a key definition indicates that the key being
emulated is the one from the numeric keypad section of the key-
board.
When saving a configuration file, it must be saved as a text file only.
The text file can be created from virtually any document editing
program. The file type to use for saving is typically referred to as
a “.txt” file in ANSI format or “ASCII DOS Text” depending on the
program used to create the file. Refer to the sample configuration
file on the CD included with the KE72.
11
Using the KE72 Serial Port
Responses from the activation of inputs may be directed to the
serial port instead of producing keystrokes as described in the
earlier configuration file section. In addition to that function, the
KE72 serial port may be used in several other modes as well.
Serial Data to Keystroke Modes -
The KE72 features two different serial data to keystroke conversion
modes. One mode accepts direct ASCII characters while the
second mode accepts “key numbers” which command the up and
down state of any key. The ASCII mode is the default mode at
power up and reset, but the mode may be changed and identified
by special one byte serial commands shown later in this section.
The ASCII to Keystroke mode will accept printable ASCII
characters and translate them into keystrokes on the PC. If an
ASCII “A” is sent to the serial port, the KE72 will produce the
required keystrokes to produce an upper case “A”. The KE72
responds with a “!” character after each byte is received in this
mode. Always wait for the “!” acknowledgement before sending
additional communication to the serial port. Any characters sent to
the KE72 which are not printable ASCII characters are ignored.
The Key Number to Keystroke modea l lows the commanding
of the up and down state of any key on the keyboard. In this
mode, each key on the keyboard is represented by a number (See
Appendix F for the key number table). Sending the key number to
the serial port results in a “down” key state for the corresponding
key. Sending the same code +128 decimal results in the “key
up” message being generated for that key. Use this key number
mode to emulate keystrokes and keystroke combinations such as
Ctrl+F1, etc. Note that “key down” refers to the press of a key
and “key up” refers to the release of a key. Always send a key up
message for a key that had previously been sent as a key down
16

while the input is held active. The rate at which the input will
repeat is the same rate dictated by the system to the keyboard.
<S> Use this delimeter to send the input response to the serial
port instead of emulating keystrokes. The sample.txt file included
on the KE72 CD provides extended examples of the serial port
function. The <S> option must follow the : or | character on the
input definition line.
ex: IN05:<S>[F] will send an ASCII “F” out of the KE72 serial
port when the input #5 is activated. In addition to an ASCII
character, a numeric value may be specified for the byte to be
sent. ex: IN05:<S>[220] will send a one byte value of 0xDC.
Inputs on the KE72 may be programmed to send up to 32 keystrokes
when activated, and up to 16 when the input is released.
example:
IN28:[p][r][e][s][s][e][d] Types “pressed” when input 28 activates
IN28|[r][e][l][e][a][s][e][d] Types “released” when input 28 deactivates
The key to be emulated is always inserted between square
brackets. The following list summarizes the associated key names
for keystrokes that are used in a KE72 Configuration File. All
other keys are represented by their direct equivalent (ex: A = A
key, B = B Key, etc.)
[Shift] = Left Shift [LShift] = Left Shift
[RShift] = Right Shift [Ctrl] = Left Ctrl
[LCtrl] = Left Ctrl [RCtrl] = Right Ctrl
[Alt] = Left Alt [LAlt] = Left Alt
[RAlt] = Right Alt [Esc] = Escape
[F1] = F1 key [F2] = F2 key
[F3] = F3 key [F4] = F4 key
[F5] = F5 key [F6] = F6 key
10
message to prevent a stuck key. The KE72 responds with a
“!” character after each byte is received in this mode. Always
wait for the “!” acknowledgement before sending additional
communication to the serial port.
NOTE: Serial data in and out of the KE72 serial port is always at 9600 Baud, 8
bit characters, No Parity, andone stop bit. No hardware handshaking is used.
Custom versions are available, please contact us with your requirements.
0xC2 - Use this one byte command to set the serial translation
mode to ASCII to Keystroke. This mode is also the default mode
at power on or reset. The KE72 responds with “!” to acknowledge
receipt of this command.
0xC3 - This command will set the KE72 serial translation mode
in Key Number to Keystroke. While in this mode, a single byte is
sent to the KE72 serial port which corresponds to the up or down
state of a particular key. Once this command byte is received by
the KE72, the serial mode will be in the key number mode until
changed by the 0xC2 command, a reset to the PC occurs, or the
PC is powered down and back up. The KE72 acknowledges re-
ceipt of this command with the “!” character.
0XC4 - Use this command to poll the KE72 for the current se-
rial translation mode. When the KE72 receives this command,
a character is returned by the KE72 which indicates the current
serial to keystroke mode.
”1” (0x31) is returned in response to the 0XC4 command if the KE72 is
operating in the ASCII to Keystroke mode.
“2” (0X32) is returned in response to the 0XC4 command if the KE72 is
operating in the Key Number to Keystroke mode.
0XC5 - Input state command. When this serial command is
received by the KE72, a string of 9 bytes are transmitted on the
serial port which indicate the current debounced status of each of
the 72 inputs on the KE72. The first byte returned in response to
17

(-) This option indicates that a “break” or release of the key is to
be done. Use this function to give the appearance of a key being
released.
ex: [(-)Ctrl] will emulate the deactivation of the Ctrl key.
Using the (+) and (-), the following line,
IN01:[(+)Ctrl] [F1] [(-)Ctrl]
will result in the Ctrl key being held on, the F1 key being pressed
and released, followed by the release of the Ctrl key.
(N) Use this option to designate the key to be emulated is from
the numeric keypad section of the keyboard.
ex: IN01:[(N)1] is used to emulate the “1” key from the “1/
End” key from the numeric keypad section of the keyboard instead
of the “1!” key from the top of the keyboard.
(~) This option is used to designate case sensitivity on an alpha
character.
ex: IN01:[(~)A] can be used to always emulate a capital A
regardless of the current Shift and Caps Lock states.
(D) Use this option within the key sequence to suspend the KE72
and delay during the output sequence. This function is always
followed by a value which specifies a delay time X .01 seconds.
NOTE: The maximum value allowed with the (D) delay command is 250.
ex: IN01:[(D)200] will execute a 2 second delay (200 X .01)
Delay statements can be cascaded to produce longer delays [(D)220][(D)150]
<R> This option is used when the input response is to be repeated
when the input is held active. The <R> must be the first text
following the : or | character on the input definition.
ex: IN70:<R>[A] will allow the “A” key response to repeat
9
the 0XC5 command represents the state of the first 8 inputs (bit 0
= Input1, bit 1 = Input2.....), and the second byte is the state of
inputs 9-16 etc. The 9th byte sent in response to the command is
the status of inputs 65-72 (Bit 7 = Input 72 state). A value of 1 in
a bit position indicates that the particular input is activated. The
status of the inputs is always available using the 0XC5 command
independent of whether inputs are programmed to respond with
keystrokes or serial data.
0X7F - Status LED Read Command. Sending 0X7F to the KE72
serial port results in the return of a character in the range of ASCII
“0” - “7”. The KE72 response character reflects the current state
of the Caps Lock, Num Lock, and Scroll Lock LEDs.
“0” - No LEDS On
“1” - Scroll Lock LED on only
“2” - Num Lock LED on only
“3” - Scroll Lock LED and Num Lock LED on
“4” - Caps Lock LED on only
“5” - Caps Lock LED and Scroll Lock LED on
“6” - Caps Lock LED and Num Lock LED on
“7” - Caps Lock, Scroll Lock, Num Lock LED all on
The serial port on the KE72 may additionally be used to load a
configuration file into the KE72 as described in the “Loading a
Configuration File to the KE72” section of the manual. When
loading the configuration from the serial port, the PC running the
load program can be a different machine than the one which has
the KE72 attached to it’s keyboard port.
18

8
following line demonstrates programming a multiple key response
to an input.
IN43:[D] [I] [R] [ENTER]
The above line in the text file will program input #43 to send a
sequence of “DIR” followed by the Enter key each time the input
is activated.
IN02:[A]
IN02|[J]
Inputs may also be programmed to send a response when the in-
put is de-activated as well as when the input is activated. The line
above will program input #2 to send an “A” key when the input is
activated and a “J” key when the input is released.
NOTE: The | character is used after the input number to define the
response for the input when it is deactivated.
IN03|[G]
Using the line above in a configuration file will set input #3 to
send the “G” key when the input is de-activated. No response will
be generated by input #3 when it is activated when programmed
as shown.
There are several delimeters that may be used in the KE72 text file
to futher define the character response. The following is a list of
these delimeter options with examples for each.
(+) This option indicates that a “make” or press of the key only
is to be done. Use this function to give the appearance of a key
being held down.
ex: [(+)Ctrl] will emulate the press of the Ctrl key. Always be sure
to send a release of any key that has been sent as a make only.
(see the next example of the (-) key release option.)
Appendix A:
Specifications
Operating Voltage5 Volts DC +/-5%, Supplied from PS/2
port.
Operating Current 80 ma Typical
Operating
Temperature
0 to 70 Degrees C
Input Header 72 individual inputs divided between
two 2 x 20 headers. .025” square pins
spaced at .100”
Required Input
Current
1.2 ma sink current typical
Input Active Time The input must be active for at least 20
msec to be considered valid.
5.50
.125
Dia (4)
Note: All dimensions are in inches.
19
4.20
This manual suits for next models
1
Table of contents
Other Hagstrom Electronics Keyboard manuals