[Next] [Up] [Previous] [Next Section] [Home] [Other]

A related page about keyboards for the IBM PC and their scan codes.


Computer Keyboards

Of course, there are many aspects to the architecture of a computer besides its instruction set. As an example of a user-interface element that varies from one computer to another, here is a laptop-esque keyboard in what I consider to be a very nice, if old style, color scheme:

The various keys are colored as follows:

These choices of color, besides making keys of different general types easy to distinguish, reflect various computer systems or terminals that I have happened to have the opportunity to use. The grey color of the printable character keys, in addition to reflecting many older terminals, also follows innumerable electric typewriters.

In my youth, designing imaginary keyboards with this color scheme, I included keys for "insert mode", "overstrike mode", and "replace mode". The "replace mode" key turned off both insert mode and overstrike mode. Insert mode worked only when the cursor was previously moved to the left using the 'cursor left' key, and worked the way insert mode works on most computers - causing characters to be typed to move those after them to the right. Overstrike mode worked only when the cursor was previously moved to the left using the 'backspace' key. So one could have insert mode and overstrike mode both turned on - and either insert when one used the cursor left key (a key typically found on electronic computer terminals, which could insert) or overstrike when one used the backspace key (found on typewriters, which can do naught but overstrike) or replace by using the "rub out" or "delete" key, nicely located below the right shift key, like the correction key on an IBM Selectric II typewriter.

The keyboard illustrated at the top attempts to be compatible with that of the IBM Personal Computer. Below is illustrated a computer keyboard that does not make such an attempt:

Back in the era of 8-bit computers, the number of keys on the keyboard was kept to a minimum. Sometimes, the type of key used was also compromised in quality. Gradually, however, 8-bit computers came out with larger keyboards and better-quality keys.

For example, the Sinclair QL computer had a set of five function keys, and a full upper- and lower- case ASCII keyboard.

The keyboard above shows what might have become available had that trend continued somewhat further.

Since the computer is designed for home use, it has a main typing area with 44 keys, which is arranged like that of an electric typewriter, even to the extent of having the characters ¢, ½, and ¼. When the CAPS LOCK key is used, the letter keys produce capital letters when not shifted, but when shifted, they produce 26 additional special characters, which include all the ASCII characters omitted from the main keyboard layout.

A numeric keypad is included, and it's a relatively generous one, including a comma key as may be convenient for entering lists of numbers, and all the basic keys needed for a calculator, even an enter exponent key.

The original IBM PC used the same keys for cursor keys and for the numeric keypad. Here, the four cursor keys are located near the main keyboard in a manner used with several computers and terminals, the Sinclair QL being one of the examples. Instead, to keep from having to add several function keys as well, the numeric keypad does double duty as a set of function keys, under the control of the FUNCTION LOCK (FN LOCK) key. But what if it is desired to use function keys with a spreadsheet program, which, making heavy use of numbers, is one where the numeric keypad is desired? Then Shift-FN LOCK instead turns the top row of 12 keys on the regular keyboard, when unshifted, into function keys.

The Fn key can be used always with both groups of keys for a function key function, and the Alt key can be used with the letter keys when not in caps lock mode for their special characters.

As there is no break key, a combination such as Control-Backspace might serve that function. Word processing programs on the PC often used the Alt key with the letter keys for special functions; here, the Code key may be used for that instead, and the Fn key could also be used with the letter keys for additional functions.

All in all, it seems like this is quite a powerful and convenient keyboard with only 82 keys. Since the +/- or change sign key, and the enter exponent key are only useful when the computer is simulating a calculator, two of the most popular advanced cursor functions, insert and home, are given to these keys as their usual functions. To make the other useful functions of Page Up, Page Down, Delete Char, and End Line as found on the PC keyboard available, at least as shifted functions, other keys along the bottom of the keyboard have been pressed into service.

There is one alternative character set, sadly neglected on today's computers, that I would also wish to include on an ideal keyboard:

The illustration above, of course, shows the keyboard arrangement used for the programming language APL.

The small characters in red on the right of the keys show how the APL keyboard could be related to a particular ASCII keyboard arrangement, the typeweriter-pairing keyboard.

Of course, APL was originally used with IBM 2741 terminals, with 88 printable characters other than the space.

ASCII terminals had 94 characters; a standard was agreed upon for the extra six characters, and the first computer terminal I encountered which implemented this standard was the Tektronix 4014. An APL version of the Teletype Model 38 was another one of the earliest terminals to include them.

The Backspace and Enter keys are displaced by the arrangement of printable character keys shown; they return to their traditional 88-character electric typewriter positions with the arrangement found on the 101-key keyboard for the IBM Personal Computer. Unlike some others, as a touch-typist, I felt that IBM had finally gotten it right on their third try.

Incidentally, here is the same keyboard arrangement as it would appear in association with the bit-pairing keyboard arrangement.

Keyboards used on ASCII terminals originally were designed so that the least significant bits of both characters on the key were the same; such terminals were called bit-pairing keyboards. The positions of characters in ASCII were chosen so that this arrangement would have some resemblance to that of characters on a manual typewriter.

The standard for the bit-pairing keyboard provided for placing the underscore above the zero as its shift, and this would have preserved the full APL keyboard arrangement, but this was uncommon in practice.

For a while, even when the technology used to implement a terminal would have allowed a typewriter-pairing keyboard to be used, it appears to have been felt that either a bit-pairing keyboard was more standard or was preferable for use by programmers. Thus, the HP 2645 terminal, which was initially sold in 1975, and which was microprocessor-based, had this keyboard arrangement:

It was a very sophisticated terminal, allowing protected fields and block mode data transfer, and it could include a pair of cartridge tape drives.

One could obtain a line-drawing character set for it, for use with forms, a set of characters that allowed very large characters to be built up on the screen, or a set of characters designed for producing mathematical equations.

For APL, it was necessary to purchase the 2641 terminal, which included the APL character set as a 128-character block including the bit-pairing APL-ASCII equivalents of the regular 94 printable characters, and a second 64-character block with overstruck characters. This meant that only one of the other optional character sets, which required one 64-character block each, could be added to the terminal. A later addition to the series, the 2648, allowed dot-addressable graphics to be drawn on the screen.

The original typewriter-pairing keyboard layout for ASCII followed more closely the arrangement of characters on a typewriter, but in this case an electric typewriter. (It was because the quote marks, having a small area, should hit the paper with less force, that they were taken away from sharing keys with two digits, and were placed both on the same key in the electric typewriter.) The APL characters could be used with both a bit-pairing and a typewriter-pairing keyboard; the assignment would produce the same arrangement of APL characters if the underscore were the shift of the zero key. This did not often happen in practice, and was disparaged in the standards. One of the most notable uses of an APL terminal with the bit-pairing arrangement was an APL version of the Teletype Model 37, but at the time, many computers and terminals had bit-pairing keyboards.

An illustration of an APL keyboard in the second edition of APL, an interactive approach by Gilman and Rose shows a diagram based on one from an IBM manual for APL\360, but including three additional keys for the added characters on an ASCII terminal with the APL character set. This diagram shows the open right brace in the shifted position. This would result in the two braces in APL being equivalent to the braces of the opposite type in normal ASCII. On the other hand, the paper by Laurence M. Breed in which the APL-ASCII standard was originally presented gives left brace as occupying the unshifted position; however, left brace is only named, not illustrated, so I was not able to be absolutely certain that left brace meant the opening brace. I was finally able to obtain a definitive resolution of this question, after failing to find images of keyboards of this type at sufficient resolution to settle the question, from a manual for a Decwriter III terminal (this terminal already had an otherwise typewriter-pairing keyboard with the braces and square brackets in the bit-pairing arrangement, like the IBM PC keyboard) which showed the ASCII codes for the various APL characters. This accords with one image of an APL keyboard I had found which, although not clear enough to show which way the braces were, showed that the key with the braces did not have ASCII characters on the front part, the other keys having the ASCII characters present where they disagreed with the APL characters in the same positions.

The two tack characters were easier to distinguish on numerous images of APL-ASCII keyboards. In the paper which originally defined the APL-ASCII keyboard arrangement, the unshifted character is referred to as left tack, and the shifted character is referred to as right tack. As it happens, this convention of naming is now known as the Bosworth convention, and the reverse assignment of names, known as the London convention, is now more common. Under the London convention, shift-B is known as "up tack", and shift-N is known as "down tack". Personally, while I am opposed to using anything but the original names for "left tack" and "right tack", since as soon as a different set of names is used, confusion can arise, I also admit that the London convention clearly makes more sense for "up tack" and "down tack". Thus, rather than preferring the Bosworth convention, my preference is: use the Bosworth convention for "left tack" and "right tack", and, as for the other two characters, always call them "encode" and "decode", and never use the terms "up tack" and "down tack" at all. In APL documentation from IBM, where a name for the symbols based on their graphical appearance, instead of their function in APL, is used, shift-B is called "base", and shift-N is called "top".

On the IBM 1130 computer, the console typewriter had a keyboard which was arranged like that on a keypunch rather than like that on an IBM 2741 terminal. On some small-scale IBM 1130 systems, it had been desirable to provide the ability to use APL from the console typewriter and not just from terminals connected to the computer. In order to permit this, an ingenious keyboard arrangement was devised at IBM:

Three additional keys on the console keyboard were available for use as part of the APL keyboard. The regular shift keys were ignored, and two of the normal character keys were used to shift in either a counterclockwise or a clockwise direction through the three possible shift states. Some of the more common overstruck characters, but not all the possible overstrikes, were provided as single characters on the keyboard.

One popular line of terminals that printed on thermal paper also came in a model that used 5-level code. It used a bit-pairing keyboard, as in those days logic gates were still relatively expensive, and so it was hardly surprising that if you wanted to use 5-level code, you had to buy another terminal, as opposed to this just being a switchable feature.

But this inspired me to think of this kind of keyboard:

that could be used on equipment that was switchable between ASCII and 5-level code and EBCDIC.

One starts with a conventional ASCII bit-pairing keyboard. But the letter keys are light gray, to distinguish them, and have on them the set of figures shift characters for 5-level code, only for use when the terminal is in this mode.

Then, on the front of the keys, are characters for use with EBCDIC. Because of the different structure of this code, a different bit is chosen to be the one inverted by the shift key. This arrangement is inspired by a modified Model 35 Teletype I saw in use as a console typewriter with an SDS 930 computer in my days as a student. The BCDIC characters rather than the EBCDIC characters were on the keyboard (so some of the rather unusual characters you might associate with the IBM 1401 were there), and not all the possible shifts were present; thus, period, comma, and some other characters had their own keys and so weren't available as shifts of other keys as well.

Keyboard arrangements discussed, and some others:

Manual typewriter:

!   "   #   $   %   _   &   '   (   )   *   +
1   2   3   4   5   6   7   8   9   0   -   =
                                          ¼
  Q   W   E   R   T   Y   U   I   O   P   ½
                                       :   @
   A   S   D   F   G   H   J   K   L   ;   ¢
                                         ?
     Z   X   C   V   B   N   M   ,   .   /

Electric typewriter:

!   @   #   $   %   ¢   &   *   (   )   _   +
1   2   3   4   5   6   7   8   9   0   -   =
                                          ¼
  Q   W   E   R   T   Y   U   I   O   P   ½
                                       :   "
   A   S   D   F   G   H   J   K   L   ;   '
                                         ?
     Z   X   C   V   B   N   M   ,   .   /

Uppercase bit-pairing ASCII:

!   "   #   $   %   &   '   (   )       *   =
1   2   3   4   5   6   7   8   9   0   :   -
                                  _   @
  Q   W   E   R   T   Y   U   I   O   P
                               [   \   +
   A   S   D   F   G   H   J   K   L   ;
                         ^   ]   <   >   ?
     Z   X   C   V   B   N   M   ,   .   /

Upper- and lower- case bit-pairing ASCII:

!   "   #   $   %   &   '   (   )       =   ~   |
1   2   3   4   5   6   7   8   9   0   -   ^   /
                                          `   {
  Q   W   E   R   T   Y   U   I   O   P   @   [   _
                                       +   *   }
   A   S   D   F   G   H   J   K   L   ;   :   ]
                                 <   >   ?
     Z   X   C   V   B   N   M   ,   .   /

Typewriter-pairing ASCII (original form):

!   @   #   $   %   ^   &   *   (   )   _   +   ~
1   2   3   4   5   6   7   8   9   0   -   =   `
                                          ]   |
  Q   W   E   R   T   Y   U   I   O   P   [   \
                                       :   "   }
   A   S   D   F   G   H   J   K   L   ;   '   {
                                 <   >   ?
     Z   X   C   V   B   N   M   ,   .   /

IBM 2741 terminal:

=   <   ;   :   %   '   >   *   (   )   _   +
1   2   3   4   5   6   7   8   9   0   -   &
                                          ¢
  Q   W   E   R   T   Y   U   I   O   P   @
                                       !   "
   A   S   D   F   G   H   J   K   L   $   #
                                 |   ¬   ?
     Z   X   C   V   B   N   M   ,   .   /

Keypunch

    #   ,   $   .               0
    @   %   *   <           -   /
  +   _   )   ¢  082  |   1   2   3   &
  Q   W   E   R   T   Y   U   I   O   P
       >   :   ;   ¬   '   4   5   6
   A   S   D   F   G   H   J   K   L
         ?   "   =   !   (   7   8   9
     Z   X   C   V   B   N   M   ,   .

Keyboard for 5-level code (US version):

  1   2   3   4   5   6   7   8   9   0
  Q   W   E   R   T   Y   U   I   O   P
   -  BEL  $   !   &   #   '   (   )
   A   S   D   F   G   H   J   K   L
     "   /   :   ;   ?   ,   .
     Z   X   C   V   B   N   M

Three-bank manual typewriter keyboard:

  1   2   3   4   5   6   7   8   9   0
  Q   W   E   R   T   Y   U   I   O   P
   @   $   %   !   _   *   /   -   #
   A   S   D   F   G   H   J   K   L
     (   )   ?   '   "   :   ;   &
     Z   X   C   V   B   N   M   ,   .

Note that the original version of the lower-case bit-pairing keyboard is also shown; many lower-case bit-pairing keyboards had the {[ and }] keys next to each other horizontally as on the modern modified typewriter-pairing arrangement on the IBM PC (and the DECwriter III and the VT 100), but the arrangement shown is the one that can be matched up to the APL keyboard image above. It could well be that it was the VT 100 terminal,

from 1978, that introduced this modification to ASCII keyboards that were designed to be like a typewriter, while the previous VT52 terminal

had a standard, conventional typewriter-pairing keyboard.

Incidentally, this diagram:

illustrates both that the IBM PC keyboard would have to be changed slightly if the PC were a typewriter, and why the columns of keys in the main area of a typewriter or computer keyboard are slanted in just the way they are, with two rows of keys placed, like bricks, so that keys in one row are centred where the boundary between two keys in the other row is located, and these two groups of two rows are then offset by one-quarter of the width of a key. This lets the centers of the keys be distinct, each separated from the closest other one by 3/16 of an inch. To fit the space bar in, the levers leading to some keys are then placed halfway between these levers, so they are on odd centers, with a spacing of 3/32 of an inch. The tabulator, on an office manual typewriter, would, like the space bar, be supported by two levers.

For a bit more about how dimensions relate to each other in a keyboard, for the keyboard illustrated in this diagram:

this diagram

shows the widths of the various keys in that keyboard.

Also, this next diagram illustrates a consideration of something that was once a characteristic of all but the cheapest computer keyboards, but which has now fallen into disuse, is shown: so that the keyboard can be tilted upwards, and yet the thrust on the keys still point straight downwards, one would have to increase the space between rows of keys on the printed circuit board. At first, a Pythagorean triple that could yield a slope of about 12.68 degrees and give an exact decimal multiple of the millimeter as the spacing of rows of keys on the printed circuit board was considered; however, as the height of the triangle doesn't have to be rational, the fact that one inch is 2.54 centimeters was put to use to allow a slope of 10.1 degrees, closer to what I felt desirable, with a spacing of rows of keys on the printed circuit board of 19.35 mm, as contrasted with the basic key spacing of 19.05 mm or three-quarters of an inch.

Note that the keyboard above is slightly less wide than the normal 105-key keyboard. This can be taken further for the following compact keyboard arrangement, which reduces the need to remove the hands from the normal touch-typing positions:

The total width of the area occupied by keys in this keyboard is 18 3/4 standard key widths of 3/4", or 14 1/16", given that the spacing between the numeric keypad and the main keyboard is half a key. It is only 1/4 of a key, or 3/16", wider than a standard keyboard with the numeric keypad removed, as the diagram above illustrates.


[Next] [Up] [Previous] [Next Section] [Home] [Other]