Keyboard Buffer
A 16-byte first-in-first-out (FIFO) buffer in the keyboard stores
the scan codes until the system
is
ready to receive them.
A buffer-overrun condition occurs when nlore than 16 bytes are
placed in the keyboard buffer.
An
overrun code replaces the 17th
byte. If more keys are pressed before the system allows keyboard
output, the additional data
is
lost.
When the keyboard
is
allowed to send data, the bytes in the
buffer will be sent as in normal operation, and new data entered
is
detected and sent. Response codes do not occupy a buffer
position.
If keystrokes generate a multiple-byte sequence, the entire
sequence must fit into the available buffer space
or
the keystroke
is
discarded and a buffer-overrun condition occurs.
Keys
With the exception of the Pause key, all keys are make/break.
The make scan code of a key
is
sent to the keyboard controller
when the key
is
pressed. When the key
is
released, its break scan
code
is
sent.
Additionally, except for the Pause key, all keys are typematic.
When a key
is
pressed and held down, the keyboard sends the
make code for that key, delays 500 milliseconds
±
20%,
and
begins sending a make code for that key at a rate of 10.9
characters per second
±
20%.
If two
or
more keys are held down, only the last key pressed
repeats at the typematic rate. Typematic operation stops when
the last key pressed
is
released, even if other keys are still held
down. If a key
is
pressed and held down while keyboard
transmission is inhibited, only the first make code
is
stored in the
buffer. This prevents buffer overflow as a result of typematic
action.
4-24
lOl/102-Key
Keyboard