Matrix Orbital LK162-12 Legacy User Manual
Page 18

LK162-12 rev 4
18
key codes will be sent via the RS - 232 interface at a rate of about 5 codes per second. This mode has
no effect if polling or if using the I²C interface.
2. Key down / Key up codes: This mode may be used when the typematic parameters of the Resend Key
code mode are unacceptable or if the unit is being operated in polled mode. The host system detects the
press of a key and simulates an auto repeat inside the host system until the key release is detected.
In this mode, when a key is held down, the key code is transmitted immediately and no other codes will
be sent until the key is released. On the release of the key, the key release code transmitted will be a
value equal to the key down code plus 20 hex. For example, the key code associated with key 'P' (0x50)
is pressed, the release code is 'p' (0x70).
In RS-232 polled mode (see 0 below) or via the I²C interface, the key down / key up codes are used;
however, the user should be careful of timing details. If the poll rate is slower than the simulated auto –
repeat it is possible that polling for a key up code will be delayed long enough for an unwanted key
repeat to be generated (see Figure 4-2).
unwanted auto-repeat
after key-up.
Polls
Key down
Key up
auto-repeat clock
valid key stroke
(before key up)
Figure 4-2 Poll timing
4.5.2 Auto repeat mode off (254 96)
This command turns off auto repeat mode.
4.5.3 Auto transmit keypresses on (254 65)
In this mode, all keypresses are sent immediately to the host system without the use of the poll keypad
command. This is the default mode on power up.
4.5.4 Auto transmit keypresses off (254 79)
In this mode, up to 10 keypresses are buffered until the unit is polled by the host system via the poll keypad
command. Issuing this command places the unit in polled mode.
4.5.5 Clear key buffer (254 69)
This command clears any unread keypresses. In a menuing application, if the user presses a key which
changes the menu context, any following key presses may be inaccurate and can be cleared out of the buffer
between menu changes to prevent jumping around the menu tree. It may also be used to, in effect, reset the
keypad in case the host
application resets for whatever reason.
4.5.6 Poll keypad (254 38)
This command returns any unbuffered keypresses via the RS - 232 interface. The host system must be set up
to receive the key codes. When the LK162-12 receives this command it will immediately return any