next up previous
Next: Making a Product Up: Device Drivers Previous: Disk (SCSI)

Keyboard

Writing a keyboard driver has fairly low priority because the serial port driver can function as a console during the early part of the port. If the interface to the keyboard hardware is simple, then the driver can go directly into ite.c with the screen driver. Usually the data returned from the hardware are key codes that must be translated into ASCII, taking into account whether the Shift, Control, or Caps Lock keys are being held down. In addition, it is occasionally useful to support undocumented key combinations that perform special tasks, such as rebooting the machine or displaying the system process table.

If the keyboard has an Alt or Command key, then it can be handled like a Meta key. For example, if the user hits Alt-E, then the keyboard driver could simulate the keys <ESC><E>. This is useful for programs like Emacs that use the Escape key to simulate a Meta key.



Lawrence Kesteloot
Fri Jan 20 16:29:52 EST 1995