Skip to Main Content
PC Hardware in a Nutshell, 3rd Edition
book

PC Hardware in a Nutshell, 3rd Edition

by Robert Bruce Thompson, Barbara Fritchman Thompson
July 2003
Beginner to intermediate content levelBeginner to intermediate
874 pages
38h 13m
English
O'Reilly Media, Inc.
Content preview from PC Hardware in a Nutshell, 3rd Edition

Chapter 19. Keyboards

A keyboard is a matrix of individual switches, one per key. Pressing a key closes its switch, generating a signal that the dedicated keyboard controller built into the keyboard recognizes as the make code for that key. Releasing the key opens the switch, which the keyboard controller recognizes as the break code for that key. Using a firmware lookup table, the keyboard controller translates received make code signals to standard scan codes, which it sends via the keyboard buffer to a second keyboard controller located in the PC, which recognizes those scan codes as specific characters and control codes.

Because releasing a key generates a break code, the local keyboard controller can recognize when two keys are pressed together (e.g., Shift-A or Ctrl-C) and generate a unique scan code for each such defined key combination. For undefined key combinations (e.g., pressing “a” and then pressing “s” before releasing “a”), the keyboard controller recognizes that, even though a break code for “a” has not been received, the user’s intent is to type “as”, and so generates the scan code for “a” followed immediately by the scan code for “s”.

Most people do not need to work with scan codes directly, but if you program you may need to use scan codes to control the behavior of a program when the user presses specific keys or key combinations. The Microsoft Keyboard Scan Code Specification, which includes the standard keyboard scan codes as well as alternative make and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computer Busses

Computer Busses

William Buchanan
Hacker Techniques, Tools, and Incident Handling

Hacker Techniques, Tools, and Incident Handling

Sean-Philip Oriyano, Michael Gregg

Publisher Resources

ISBN: 059600513XErrata Page