Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computing, a
keyboard controller is a device which interfaces a keyboard to a
computer. Its main function is to inform the computer when a key is
pressed or released. When data from the keyboard arrive, the controller
raises an interrupt (a keyboard interrupt) to allow the CPU to handle
the input. If a keyboard is a separate peripheral device wired to the
system unit (such as in most modern desktop computers), then keyboard
controller is not actually attached to keys' circuits, but receive
scancodes from a microcontroller embedded to keyboard via some kind of
serial interface. In this case the controller also should control
keyboard's LEDs by sending data back to keyboard through the wire.