L3 Systems KeyAT User manual

KeyAT
Copyright 1996-2003
L3 Systems, Inc.
Redmond, WA
RS232/485
Keyboard
Port Adapter
(Version 2.0Pand above)

Quick Reference
Description Cmd Notes
ASCII transfer* ~A Negates binary transfer (~B)
Binary transfer ~B Use only with ~K or ~S
Set to character mode* ~C Send ASCII chars
ASCII hex mode ~H Send Hex ASCII chars
Keyboard code mode ~K Send direct key codes
DOS scan code mode ~S Send DOS scan codes
Reset/Enable
Commands ~~~~~~~
~~~ 10 ~ does reset if commands on, if
not, it enables commands
Turn off Commands ~@ Turn off commands (~anything)
Send scan code ~:nn Sends scan code nn
Scan code Key down ~+nn Sends key down, scan code nn
Scan code key up ~-nn Sends key up, scan code nn
Immediate turn around ~I Data interpreted as received, non-
addressed mode only
Line turn around* ~L Data buffered until enter or <CR>
Monitor ON ~M Monitor keyboard, key codes
Qwerty Monitor ON ~Q Monitor keyboard, ASCII
Monitor off* ~N Turn off keyboard monitoring
Display ON/OFF LEDs ~Dnn Sets keyboard LED status to nn
Transfer to keyboard ~Xnn Sends nn to keyboard
Status request ~? Response = AA-EELLDBTM
Sleep ~Znn Sleeps nn seconds
Set turnaround delay ~Pnn Sets turnaround to nn milli-sec
Send CR mode ~F Sends <CR> through
Re-assign ASCII code ~Gaaxx Sets char aa to use scan code xx
Re-map ASCII Chars~Raa112
2b1122 Re-maps ASCII characters aa and
bb as 1122
**Test Mode ~T KeyAT test
EEPROM Read ~ERnn Read EEPROM string #nn
EEPROM Write ~EWnn Write EEPROM string #nn
EEPROM Execute ~EEnn Execute EEPROM string #nn
*default setting **Available only with KeyAT-2 with EEPROM

KeyAT
Copyright 1996-2003
L3 Systems, Inc.
Redmond, WA
NOTE: LED Solid=Keyboard activity, Blinking=RS-232/485 Activity


KeyAT Keyboard Port Adapter
L3 Systems i5/19/2007
Contents
Introduction 1
Connections 2
LED Status 2
Jumpers & Switches 3
K1 Keyboard Jumper 3
K2 RS232/485 Jumper 3
Mini-DIN Connector Pin out 3
DIP Switch Settings 4
Sending Data 5
Commands 5
Data Mode Commands 6
Send a Scan Code 7
Up/Down Scan Codes 7
Transfer Setting 7
Turn Around Setting 8
Keyboard Monitor 8
Status Request 9
Keyboard Commands 9
Test KeyAT 9
Sleep 10
EEPROM Commands 10
Chaining 11
Autoexec 11
Special Characters 12
Examples 12
Serial Port Operation 13
Serial Port Connector 13
Multi-drop Connection 14
RS485 Wiring 14
Scan Codes 15
ASCII Scan Codes 18
Warranty 23

KeyAT Keyboard Port Adapter
5/19/2007 ii L3 Systems
Warning
Improper grounding can cause damage to equipment!!! Before
connecting two computers, make sure that they share a
common system ground and always stay connected to the
same ground during the use of the KeyAT Keyboard Port
Adapter. If you are anyway unsure that two computers share
the same ground, do not connect them in any way using the
KeyAT Keyboard Port Adapter. L3 systems does not warranty
damage to the KeyAT Keyboard Port Adapter due to improper
grounding, and does not warranty damage to connected
equipment for any reason.
FCC Class B Approval Information
NOTE: This equipment has been tested and found to comply
with the limits for a class B digital device, pursuant to part 15
of the FCC Rules. These limits are designed to provide
reasonable protection against harmful interference in a
residential installation. This equipment generates, uses and
can radiate radio frequency energy and, if not installed and
used in accordance with the instructions, may cause harmful
interference to radio communications. However, there is no
guarantee that interference will not occur in a particular
installation. If this equipment does cause interference to
radio or television reception, which determined by turning the
equipment off and on, the user is encouraged to correct the
interference by one or more of the following measures:
•Reorient or relocate the receiving antennae
•Increase the separation between the equipment and the
receiver
•Connect the equipment into an outlet on a circuit different
from that to which the receiver is connected

KeyAT Keyboard Port Adapter
L3 Systems iii 5/19/2007
•Consult the dealer or an experienced radio/TV technician
for help


KeyAT Keyboard Port Adapter
L3 Systems 15/19/2007
Introduction
The KeyAT keyboard port adapter allows key codes to be sent
to a computer or received from the keyboard by translating RS-
232 or RS-485 signals to/from keyboard interface signals.
Typical uses for the KeyAT Keyboard Port Adapter are:
•Testing software -With the help of a KeyAT, you can
develop a sequence of keys and send them to the
keyboard port of a computer running the software that
you want to test. You can do this without having to add
any software or ports to the computer system you are
testing.
•Multi-system testing -Using the multi-drop capability of
the KeyAT keyboard port adapter allows centrally
controlled testing of up to 58 systems simultaneously.
Only the KeyAT port adapter allows such flexibility.
•Remote Access -The KeyAT keyboard port adapter
allows remote access to a system where the software
does not provide any other method.
•Monitoring Keyboard sessions -The KeyAT can be
used to monitor keyboard sessions. This can be helpful
to develop regression test data or to detect keystrokes
that are causing problems with target software.
•Serial Keyboard -Attach a Keyboard to your
Computer's RS-232 Port -You can use the KeyAT to
send and receive from a Keyboard attached to an RS-
232 port.
•Attaching input devices –Allows you to attach RS-
232/RS-485 devices to the keyboard port such as bar
code readers, scales, and credit card readers.

KeyAT Keyboard Port Adapter
5/19/2007 2L3 Systems
Connections
The following illustrates a typical connection of the KeyAT.
1. The keyboard plugs into the 6-pin mini-DIN PS/2 style
keyboard connector. Use CL0004 adapter (5-pin DIN female
to 6-pin mini-DIN male) for older 5-pin DIN AT style
connectors.
2. A 6PIN male-to-male Mini-DIN cable (PN CL0008) is
supplied to connect the KeyAT to the computer. Use CL0003
adapter (6-pin mini-DIN female to 5-pin DIN male) for older
5-pin DIN AT style motherboard connections.
3. The Serial port connects the same as a modem if using the
RS-232 interface. See the Serial Port Operation section
for more details.
When a keystroke is received from the keyboard, the
RS232/485 port is blocked. Likewise, when an RS232
command is received, the keyboard is blocked. Note:
simultaneous use in any configuration is discouraged.
LED Status
A red status indicator located next to the computer port
indicates port activity. It turns solid red when the attached

KeyAT Keyboard Port Adapter
L3 Systems 35/19/2007
keyboard port is being used. It blinks whenever the RS-
232/485 port is active. If a non-zero address is set, the LED
blinks only when selected.

KeyAT Keyboard Port Adapter
5/19/2007 4L3 Systems
Jumpers and Switches
K2 -RS232/RS485 Jumper
K2 Selects between an RS232 and an RS485 interface.
K3 –5 Volt From DB-25 RS-232 Connector
K3 connects DB-25 Pin 9 to 5 volts. This can be used to power
KeyAT from DB-25 connector. Warning: This is not normally
connected. If 5V power is connected to PC, then damage
can can occur if also connected to external supply!
KeyAT Keyboard & PC Mini-DIN Connector
The following connector shows the pin definitions for the two 6
pin Min-DIN connectors. If the application is an RS-232
keyboard, the computer Mini-DIN connector can be used to
provide 5 volts power.
+5V
Pin 4
GND
Pin 3
CLOCK
Pin 5
Male “cable” connector
DATA
Pin 1
12
34
56
1
234
56
CLOCK
Pin 5
GND
Pin 3
DATA
Pin 1
+5V
Pin 4
KeyRF 6 PIN
Mini-DIN
Connector
Female “panel” connector

KeyAT Keyboard Port Adapter
L3 Systems 55/19/2007
SWA -DIP SWITCH Settings
Positions 1-6, Address Select C=Closed, O=Open
ADDR 1
2
3
4
5
6
ADDR 1
2
3
4
5
6
NONE O
O
O
O
O
O
31 C
C
C
C
C
O
1C
O
O
O
O
O
32 O
O
O
O
O
C
2O
C
O
O
O
O
33 C
O
O
O
O
C
3C
C
O
O
O
O
34 O
C
O
O
O
C
4O
O
C
O
O
O
35 C
C
O
O
O
C
5C
O
C
O
O
O
36 O
O
C
O
O
C
6O
C
C
O
O
O
37 C
O
C
O
O
C
7C
C
C
O
O
O
38 O
C
C
O
O
C
8O
O
O
C
O
O
39 C
C
C
O
O
C
9C
O
O
C
O
O
40 O
O
O
C
O
C
10 O
C
O
C
O
O
41 C
O
O
C
O
C
11 C
C
O
C
O
O
42 O
C
O
C
O
C
12 O
O
C
C
O
O
43 C
C
O
C
O
C
13 C
O
C
C
O
O
44 O
O
C
C
O
C
14 O
C
C
C
O
O
45 C
O
C
C
O
C
15 C
C
C
C
O
O
46 O
C
C
C
O
C
16 O
O
O
O
C
O
47 C
C
C
C
O
C
17 C
O
O
O
C
O
48 O
O
O
O
C
C
18 O
C
O
O
C
O
49 C
O
O
O
C
C
19 C
C
O
O
C
O
50 O
C
O
O
C
C
20 O
O
C
O
C
O
51 C
C
O
O
C
C
21 C
O
C
O
C
O
52 O
O
C
O
C
C
22 O
C
C
O
C
O
53 C
O
C
O
C
C
23 C
C
C
O
C
O
54 O
C
C
O
C
C
24 O
O
O
C
C
O
55 C
C
C
O
C
C
25 C
O
O
C
C
O
56 O
O
O
C
C
C
26 O
C
O
C
C
O
57 C
O
O
C
C
C
27 C
C
O
C
C
O
*58 O
C
O
C
C
C
28 O
O
C
C
C
O
**59 C
C
O
C
C
C
29 C
O
C
C
C
O
***60 O
O
C
C
C
C
30 O
C
C
C
C
O
****61 C
O
C
C
C
C
* Special setting, CR pass-through Mode (~F), KeyAT not addressed
** Special setting, for Immediate Mode, KeyAT not addressed
*** Special Setting, for Qw erty Monitor Mode (~Q) , KeyAT not addressed
**** Special Setting, for Monitor Mode (~M) , KeyAT not addressed
Positions 7-8, Baud Rate
BAUD Rate 7
8
9600 O
O
4800 C
O
2400 O
C

KeyAT Keyboard Port Adapter
5/19/2007 6L3 Systems
1200 C
C

KeyAT Keyboard Port Adapter
L3 Systems 75/19/2007
Sending Data
The main job of a KeyAT is to transfer data from the RS-232 or
RS-485 port and send it through to the computer's keyboard
port. Data can be sent using ASCII, ASCII control codes, DOS
scan codes, keyboard scan codes or ASCII hex. If you are
using line turn around mode or if the KeyAT is addressed, a
line can have a maximum length of 46 characters and should
end with an <ENTER> (CR, hex 0D). When using immediate
mode, data and commands are interpreted as received, and
buffered up to 46 characters. If you get more than 46
characters ahead of the computer, the additional characters
will be ignored. Characters are not echoed when the KeyAT is
addressed.
If the KeyAT is addressed, a colon is sent back immediately to
acknowledge that the data was received. If the KeyAT is not
addressed and in line turn mode, a colon is sent back after
the data has been processed, signaling that another command
can be sent. The following example shows the ASCII
characters ‘DIR<ENTER>’ being sent through the KeyAT.
Example: KeyAT 2.0x, [C]L3 Systems, 1996-2003
:DIR^M<ENTER>
:
Commands
Commands are instructions to the KeyAT to do something
other than just pass data through to the computer. All
commands begin with a ~ (tilde, hex 7E) character followed by
a command character and then in some cases some data.
~@ Disable Commands –All commands are disabled until 10
consecutive tildes (~~~~~~~~~~) or reset/power cycle.
~~~~~~~~~~ Reset/Enable Commands –If commands are
disabled, this will enable commands. If

KeyAT Keyboard Port Adapter
5/19/2007 8L3 Systems
commands are enabled, this will reset the
KeyAT (& run power-up string if loaded).

KeyAT Keyboard Port Adapter
L3 Systems 95/19/2007
Data Mode Commands
The four mode commands set the way data is interpreted by
the KeyAT. A mode is set until another mode is given or until
a power failure occurs.
~C Character Mode -is the default mode of operation.
When this mode is set, any ASCII character except ~
(tilde, hex 7E), ^ (caret, hex 5E), and CR (return, hex 0D)
is converted to the scan codes for that character. Each
ASCII character will be sent to the keyboard with the
corresponding “make” and “release” codes. Allow enough
time for the codes to be sent through to the computer, as
an ASCII code can require up to 10 keyboard codes to
execute.
Control codes may be sent by a combination of a ^ (caret,
hex 5E), and the corresponding letter. For example, a
control C (Hex 03) is ^C.
~H Hex ASCII Mode -Data is interpreted as hexadecimal
encoded ASCII. For example, to send the computer the
character 'A', you would need to send its hexadecimal
ASCII value (Hex 41) as two ASCII digits, 4 and 1.
~S Scan Code Mode -In this mode, data is translated to the
corresponding keyboard scan codes. For an ASCII
transfer, each pair of ASCII encoded characters is
interpreted as a DOS scan code. For a binary transfer,
each 8-bit character is interpreted as a DOS scan code.
DOS assigns each key a DOS scan code. Note that all
DOS scan codes are sent complete with make and break
sequences.
~K Key Code Mode -In this mode, codes are sent directly to
the computer without interpretation. For an ASCII
transfer, each pair of ASCII encoded characters are
interpreted as one keyboard code. For a binary transfer,
each 8-bit character is interpreted as a keyboard code.

KeyAT Keyboard Port Adapter
5/19/2007 10 L3 Systems
Care should be taken in using keyboard scan codes, as
the computer can be left in a very confused state if the
scan code sequence is not properly completed

KeyAT Keyboard Port Adapter
L3 Systems 11 5/19/2007
Send a scan code
If you want to send a scan code without going into scan code
mode, then use the ~:nn command. This is useful for the
occasional function key, arrow key or any other keys that
doesn’t have an ASCII equivalent. See the scan code table
later on for a list of valid scan codes.
~:nn Send Scan Code –This scan code nn.
Example: :~:73<ENTER> (sends PgUp)
Up/Down Scan Codes
Use these two commands to send a key down or a key up to
the computer. A common use is for Shift, Alt and Cntl keys,
which vary the meaning of successive scan codes. See the
scan code table later on for a list of valid scan codes.
~+nn Key down Scan Code –This sends just the key down
(make) sequence for scan code nn.
~-nn Key up Scan Code –This sends just the key up (break)
sequence for scan code nn.
Example:
:~+56~:62~-56<ENTER> (sends <Alt>F4)
where: ~+56 Sends Alt down sequence
~:62 Sends F4 scan code
~-56 Sends Alt up sequence
Transfer setting
There are two transfer settings, ASCII and binary. The binary
transfer setting applies only to scan code mode (~S) and key
code mode (~B). The setting is persistent until the next ~A or
~B command or until power is cycled.
~A ASCII Transfer -This is the default setting. If ASCII
transfer is set, all data is interpreted as ASCII.

KeyAT Keyboard Port Adapter
5/19/2007 12 L3 Systems
~B Binary Transfer -In scan code or key code modes. data is
sent as 8 bit binary.
Table of contents
Other L3 Systems Adapter manuals