1. Home
  2. Computing & Technology
  3. Linux

Text-Terminals on Linux

From Authors, for About.com

19.8 Keyboards

Interchangeability

The keyboards for terminals are not the same as keyboards for PC's. The difference is not only in the key layout but in the codes generated when a key is pressed. Also, keyboards for various brands and models of terminals are not always interchangeable with each other. Sometimes one get an "incompatible" keyboard to partially work on a terminal: All the ASCII keys will work OK, but special keys such as set-up and break will not work correctly.

How They Work

Most keyboards just make a simple contact between two conductors when you press a key. Electronics inside a chip in the keyboard converts this contact closure into a code sent over the keyboard's external cable. Instead of having a separate wire (or conductor) going from each key to the chip, the following scheme is used: Number the conductors say from 1-10 and A-J. For example: conductor 3 goes to several keys and conductor B goes to several keys, but only one key has both conductors 3 and B going to it. When that key is pressed, a short circuit is established between 3 and B. The chip senses this short and knows what key has been pressed. Such a scheme reduces the number of conductors needed (and reduces the number of pins needed on the chip). It's a similar scheme to what is called a "crossbar switch".

Modern vs Old Keyboards

While the modern keyboard and the old fashioned type look about the same, the mechanics of operation are different. The old ones have individual key switches under the key-caps with each switch enclosed in a hard plastic case. The modern ones use large flexible plastic sheets (membrane) the size of the keyboard. A plastic sheet with holes in it is sandwiched between two other plastic sheets containing printed circuits (including contact points). When you press a key, the two "printed" sheets are pressed together at a certain point, closing the contacts printed on the sheets at that point.

One Press Types 2 Different Characters

If, due to a defect, conductors 3 and 4 become shorted together then pressing the 3-B key will also short 4 and B and the chip will think that both keys 3-B and 4-B have been pressed. This is likely to type 2 different characters when all you wanted was one character.

Keyboard doesn't work at all

If none of the keys work try another keyboard (if you have one) to verify that the keyboard is the problem. One cause is a broken wire inside the cord (cable) that connects it to the terminal. The most likely location of the break is at either end of the cord. Try wigging the ends of the cord while tapping on a key to see if it works intermittently. If you find a bad spot, you may carefully cut into the cord with a knife at the bad spot and splice the broken conductor. Sometimes just a drop of solder will splice it. Seal up the cord with electrical tape, glue, or caulk. A keyboard that has gotten wet may not work at all until it's dry.

Typing b displays bb, etc. (doubled)

If all characters appear double there is likely nothing wrong with the keyboard. Instead, your terminal has likely been incorrectly set up for half-duplex (HDX or local echo=on) and every character you type is echoed back both from the electronics inside your terminal and from your host computer. If the two characters are not the same, there may be a short circuit inside your keyboard. See One Press Types 2 Different Characters

Row upon row of the same character appears

This may happen when auto-repeat is enabled and a key is held pressed down (or the like). It may be a key that sticks down when typed or it could be an electrical short that has the same effect.

Key sticks in down position (individual switches)

First try tapping on it hard several times but it's not likely to fix it. Next, your can either remove the keycap (if it is removable) and squirt a little cleaner on the push rod or work the key up and down while pushing on it sideways (or both). If this doesn't work you may need to take the switch apart and clean the components.

If you decide to remove the keycap see

* License

* Text Terminal How-To Index

Explore Linux
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux HowTos
  5. Text-Terminals How-To
  6. Text-Terminals on Linux - 19.8 Keyboards

©2009 About.com, a part of The New York Times Company.

All rights reserved.