Section 2.2. Keyboard Variation and Settings


2.2. Keyboard Variation and Settings

Understanding the effects of keyboard variation is essential, because you may need to work with different keyboards, or you may need to write instructions for people who use different keyboards. If you design computer applications for a potentially worldwide market, you need to make them work in wide range of environments. Even a simple form on a web page might be a computer application in this sense.

2.2.1. Typing CharactersJust Pressing a Key?

Typing characters on a computer may appear deceptively simple: you press a key labeled "A," and the character "A" appears on the screen. Well, you actually get uppercase "A" or lowercase "a" depending on whether you used the Shift key or not, but that's common knowledge. You also expect "A" to be included into a disk file when you save what you are typing, you expect "A" to appear on paper if you print your text, and you expect "A" to be sent if you send your text by email or something like that. Moreover, you expect the recipient to see an "A."

It has hopefully become clear from the previous discussion that the representation of a character in computer storage or disk or in data transfer may vary a lot. You have probably realized that especially if it's not the common "A" but something more special, like an "A" with an accentsay, À'strange things might happen, especially if data is not accompanied with adequate information about its encoding.

You might still be too confident. You probably expect that on your system at least things are simpler than that. If you use your very own very personal computer and press the key labeled "A" on its keyboard, then shouldn't it be evident that in its storage and processor, on its disk, and on its screen it's invariably "A"? Can't you just ignore its internal character code and character encoding? Well, probably yeswith "A." Don't be so sure about À, for instance. On a typical PC, for example, try this: create a file containing À in Notepad and then open the command-line interface (DOS prompt) and display the file using the type command. Instead of À, you will see the graphic element , or something else, depending on your computers settings.

When you press a key on your keyboard, the keyboard sends the code of a character to the processor. The processor then, in addition to storing the data internally somewhere, normally sends it to the display device. Now, the keyboard settings and the display settings might be different from what you expect. Even if a key is labeled, say, Ä, it might send something other than the code of Ä in the character code used in your computer. Similarly, the display device, upon receiving such a code, might be set to display something different. Such mismatches are usually undesirable, but they are definitely possible.

2.2.2. Keyboard Limitations and Variation

Typical computer keyboards do not contain enough keys even for all characters in an 8-bit character code with 256 code positions. If your computer uses internally, say, the ISO Latin 1 character repertoire, you probably won't find keys for all the 191 characters in it on your keyboard. Many characters can be produced by using auxiliary keys, such as Shift and Alt, that extend the repertoire of characters. However, you cannot type, for example, the yen sign ¥ or the plus-minus sign ± on a normal U.S. keyboard in any obvious way.

Different keyboards are manufactured and used, often according to the needs of particular languages. For example, keyboards used in Sweden often have a key for the å character but seldom a key for ñ; in Spain, the opposite is true. For an illustration of the variation, as well as to see what layout might be used in some environments, visit http://www.microsoft.com/globaldev/reference/keyboards.aspx, an interactive Windows Layouts page by Microsoft. Using it requires Internet Explorer with JavaScript enabled. For an example of its presentation style, see Figure 2-2.

Practical considerations limit the number of characters that have a key of their own or appear as engraved on a key at all. For the Unicode character repertoire, it would of course be quite impossible to have a key for each character. This is one reason why it is important to identify which characters are commonly used in a writing system and in a language. Among all the Unicode characters, only a small part can be directly assigned to keys.

2.2.3. Auxiliary Keys

Some keyboard key combinations, typically involving the use of anAlt or AltGr key or some other auxiliary key, are often automatically processed by converting them to special characters. For example, pressing the "E" key while keeping AltGr pressed down might produce the euro sign, €. This usually takes place at a low, device-oriented level, in software called the keyboard driver. In that case, normal programs would have all their input from the keyboard processed that way. The practical impact is that on a given system, these methods usually work across programs, unless some program specifically overrides such functionality for its own purposes.

Notations that refer to the use of auxiliary keys vary a lot. O'Reilly books use the style AltGr-M (and similarly Alt-M, Ctrl-M, Shift-M, etc.). Another common style is AltGr+M, and sometimes you'll see AltGr M.

The well-known Shift key is an auxiliary key, too. It is used to modify the meaning of another key, e.g., by changing a letter to uppercase or turning a digit key to a special character key.

The effects of auxiliary keys depend on the program used, and even on its settingsand on the keyboard and its settings. The effects are often user-modifiable. For example, producing the euro sign using the method described at the beginning of this section requires a special "euro update" on old Windows systems. Some confusion was caused when people said, e.g., "to type the euro, use AltGr-E" as general, unqualified advice. A keyboard might even not have an AltGr key, and if it does, the key that produces the euro sign varies by country.

On many keyboards, especially in Europe, there is an Alt key to the left of the spacebar and an AltGr key to the right of it, and these keys have different functionality. On U.S. keyboards, there is usually an Alt key on each side of the spacebar. The reason why European keyboards usually have an AltGr key is because it makes it easy to type the additional characters needed in many languages.

Generally, using the AltGr key corresponds to using the Alt key and the Ctrl key simultaneously; AltGr is the same as Alt-Ctrl. Thus, if your keyboard has no AltGr key, you might still be able to type the micro sign µ, for example, by pressing Alt-Ctrl-M. However, this depends on keyboard and program settings.

Some keyboards have two different Ctrl keys as well, so that the left Ctrl key works the usual way, and the right Ctrl key is yet another key for producing alternate graphic characters.

The name AltGr is short for "alternate graphic," and it is mostly used to create additional characters, whereas the Alt key is typically used for keyboard access to command menus, as an alternative to using a mouse. The AltGr key creates a new layer of possible characters that normal keys can produce, but usually this layer is not very densely populated. Moreover, the use of AltGr is partly handled at application program level, not in keyboard drivers; thus, in a particular system, AltGr-R might produce the registered sign ® in one program, but do nothing in another. To see the AltGr assignments in your copy of MS Word, search for "Alt Gr" in its Help system.

Typical usage includes AltGr-M to produce the micro sign µ. The connection between the normal character in a key and the alternate character is not obvious, but it is usually somehow natural. The AltGr settings vary greatly by the needs of different languages and cultural environments. A few examples:

Figure 2-2. Spanish keyboard in two states, normal and AltGr state


  • On a British (U.K.) keyboard, AltGr-A produces á, and similarly for e, i, o, and u. Alt-$ produces €.

  • On a Canadian Multilingual keyboard, AltGr is used to type several characters, such as < and >, which cannot be typed directly, since keys have been allocated to some accented letters. AltGr is also used for typing French quotation marks (guillemets).

  • On a Greek keyboard, AltGr is used to type several special symbols, e.g., AltGr-ρ produces ®; AltGr-υ produces ¥; and Alt--, ±.

  • On a Romanian keyboard, which has some keys reserved for letters with diacritic marks, the AltGr key is used to type some characters like \ and |. There are also some AltGr combinations for characters that do not appear in Romanian but in neighboring languages, e.g., ß and .

Key caps may have additional engravings that act as hints and reminders on the alternate graphic characters. For example, the "E" or $ key may have € engraved onto it.

2.2.4. Dead Keys

For languages that use diacritic marks extensively, it is natural to try to accommodate letters with diacritic marks into the keyboard. This is possible for many languages that use a small set of such letters, perhaps just two or threee.g., ä, ö, and ü in German. However, if there are many different combinations of a letter and diacritic marks, it is more practical to include keys that correspond to the diacritic marks.

Many keyboard designs contain auxiliary keys for typing characters with diacritic marks. The key might have the characters ´ and ' (acute accent and grave accent) engraved onto it, for example. Hitting such a key has no visible effect as such, but when followed by a letter, it might add an accent on the letter. Thus, on a Spanish keyboard, as was illustrated in Figure 2-2, you would press the ´ key, and then the "O" key to type ó.

Such an auxiliary key is often called a dead key, since just pressing it causes nothing; it works only in combination with some other key. You press it before pressing a letter key, not simultaneously. A more official name for a dead key is modifier key.

A dead key itself may be affected by a Shift key. Thus, Shift-´ followed by "a" might produce à, and Shift-´ Shift-A would then produce À. Moreover, even AltGr might affect a dead key. On a normal Finnish keyboard, there is a dead key with the dieresis (¨) and the circumflex (^) above it (i.e., as "upper case," to be generated using the Shift key) and the tilde (~) below or left to it. This means that on such a keyboard, the AltGr key is needed for producing a letter with tilde.

The use of dead keys has essential limitations. Usually the diacritics cannot be freely combined with letters. For example, if I use a Finnish keyboard and hit the acute key (´), and then the "C" key, I do not get a c with acute () but the acute accent character followed by the letter (´c). The dead keys work within some repertoire and encoding and settings, not as a general tool.

On keyboards with dead keys, characters that can be directly typed on a U.S. keyboard may cause difficulties. For example, if the tilde ~ key is a dead key (to make it easier to type ã, õ, etc.), then you cannot always type the tilde itself directly. If you try to type a string like "~abc", it will be converted to ãbc. The solution is to press the spacebar after pressing the tilde key. This might be seen as putting the tilde on a space character. This illustrates why even ASCII characters such as the tilde can be difficult to produce.

Keyboard solutions are not always systematic. They may result from combinations of different ways of supporting diacritic marks. For example, a typical French keyboard has separate keys for those accented characters that are used in French (e.g., à), but in order to write the accents as characters, you need special methods, such as AltGr-è followed by a space to produce the grave accent '.



Unicode Explained
Unicode Explained
ISBN: 059610121X
EAN: 2147483647
Year: 2006
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net