User manual

Code Mercenaries
5
KK
KK
ee
ee
yy
yy
WW
WW
aa
aa
rr
rr
rr
rr
ii
ii
oo
oo
rr
rr
22
22
44
44
5. Device Operation
KeyWarrior24 registers as a standard HID
keyboard and supports boot protocol. It does not
need any special drivers to be installed, standard
system drivers are sufficient.
The country code is 0 for not localized hardware,
which allows to use a single version of the chip for
all international keyboard layouts. Usage codes are
defined for 0 to 164, which include the Power key
and the = sign in the keypad, as well as the
compose keys for Asian languages and several
special keys that may or may not be supported by
individual operating systems.
In addition the media control keys Mute, Play/
Pause, Eject, Fast Forward, Fast Backward,
5.1 Power Up
Every time the supply voltage is applied
KeyWarrior24 executes an internal reset sequence.
All internal pull up resistors are disabled upon
power up and will be activated during the internal
reset sequence.
5.2 Keyboard Scanning
KeyWarrior24 scans the keyboard matrix every
t
scan
by sequentially pulling one of the Y lines low
and then reading the status at the X lines. When the
scan matrix changes status and then remains stable
for t
debounce
KeyWarrior24 decodes the changes
and generates scancodes.
On KeyWarrior24-S3 the nine direct connected
keys are checked every t
scan
and are decoded after
remaining stable for t
debounce
.
5.2.1 Encoder scanning
KeyWarrior24-S3 scans the encoder inputs at the
highest rate possible. The actual rate depends on
several parameters and is not static.
The encoder inputs are not debounced. It is not
recommended to use mechanical encoders without
an external debouncing circuit. Key strokes are
generated immediately upon detecting the rising
edge on the A signal from an encoder when in Full
mode, in quadrant mode a key is generated on
every edge on A or B.
5.3 Key Rollover
KeyWarrior supports true n-key rollover. All keys
in the matrix may be pressed at the same time
without KeyWarrior missing any code. However
due to the phantom key effect it can not be
guaranteed that combinations of many keys are
properly reported (see 5.3.1).
USB has a limitation on how many keys can be
reported at the same time. On USB any six keys
plus all eight modifiers (GUI, Ctrl, Alt, Shift) may
be pressed at the same time. If more than six
ordinary keys are pressed an error state is reported.
So USB has a 6-key plus modifiers rollover.
5.3.1 Phantom Keys
Phantom keys do occur when three or more keys in
a keyboard matrix are pressed in a combination
that leads to the matrix reading like a fourth key
has been pressed.
To avoid phantom keys diodes may be added to the
keys. If diodes are used they have to be put in
series with the key switches. The kathodes have to
be connected to the Y lines and anodes to X lines.
It is highly recommended to place all modifier
keys on a single row or column and put diodes on
all of them.
5.4 Custom Scancode Tables
The standard KeyWarrior24 has a fixed key table
that is factory programmed. For production
volumes it is possible to order KeyWarrior24 with
an individual key layout.
KeyWarrior uses a single table to translate the
matrix coordinates to USB usage codes. This table
is called the "Master Translation Table".
For information on generating the Master
Translation Table please refer to the document
"Creating Custom KeyWarrior Scancode Tables".
5.5 Function Shift Keys
KeyWarrior24 allows the definition of two function
shift keys. If one of these keys is pressed
KeyWarrior uses a second or third translation table
to convert matrix coordinates to USB usage codes.
This allows a small keyboard to generate all
functions of a full sized keyboard.
The function shift key may be on any coordinate in
the matrix, it is assigned by placing a special code
in the corresponding table position.
V 1.1.2, December 2nd 2013, for chip revision 1.1.1.4/1.1.1.B and up