Ellipsix Informatics: Tutorial: Keyboard Layouts
ellipsix informatics
Ellipsix Tutorials » Keyboard Layouts

Not all keyboards are created equal. Throughout the world, there are many different kinds of computer keyboards; they differ not only in the sizes and shapes of the buttons, but also in which letters or symbols (characters) are assigned to which buttons. In some cases, it's clear why this difference is necessary; a keyboard with the Latin character set on it (that is, the set of letters and symbols used to write English, French, German, Spanish, Irish, Welsh, and most other Western European languages) isn't much help to someone who wants to type using Chinese characters (at least, not without some special tricks). But even, say, within the English-speaking countries of the world, there are many different kinds of keyboards in use: http://en.wikipedia.org/wiki/Keyboard_layout#Keyboard_layouts_for_roman_script

Of course, the computer doesn't innately know what character(s) is/are represented by each key. That information is encoded in keyboard layout files. When you press a key, the computer only receives a number — for example, 29 — and it needs to consult the keyboard layout to determine what letter that is. In this case, 29 is Y on my laptop. Normally when people get a new computer, it's been configured at the factory with the keyboard layout file that corresponds to the actual keyboard the computer ships with. In other words, the people who build the computer make sure that if key #29 has the letter Y printed on it, then the keyboard layout actually says "29 = Y".

However, you can easily change which keyboard layout your operating system uses. For example, I can make my computer think that I have a German keyboard, and it will act accordingly. German keyboards have a Z printed on key #29, where American keyboards have the Y, so the German keyboard layout file would say "29 = Z". Of course, nothing requires that a keyboard layout file has to correspond to a real keyboard; you could make one in which 29 represents ;, even though there's probably no real keyboard that has the semicolon printed on key #29. There are many of these made-up keyboard layouts floating around out there, and some of them even use certain keys to represent things more complicated than plain old letters.

The U.S. International is one of those. It was developed to allow people with American keyboards to use accented characters with only a few keystrokes. Basically, this keyboard layout is just like the normal US keyboard layout except that some keys are made to represent accents, rather than just letters. This is done by making them function as deadkeys. A deadkey is "dead" in the sense that when you push it, it doesn't do anything right away. It sets a switch in the computer's memory indicating that the character for the next key pressed should be modified in some way, such as adding an accent. Here are the deadkeys on the U.S. International keyboard layout:

• The single quote key on the right side (#48) becomes an acute-accent deadkey (áéíóú)
• The backquote key in the upper left (#49) becomes a grave-accent deadkey (àèìòù)
• The double quote key on the right, which is actually SHIFT+single-quote (SHIFT+#48), becomes an umlaut/double-dot deadkey (äëïöü)
• The caret key, which is SHIFT+6 (SHIFT with #15), becomes a circumflex deadkey (âêîôû)
• The tilde key in the upper-left, which is SHIFT+backquote (SHIFT with #49), becomes a tilde deadkey (ñ)
• The Alt key in the lower right (#113) becomes an AltGr modifier key, although on my computer its only function is to allow the input of the Euro sign with the E key
Some of the special character codes for TextWriter do the same thing as deadkeys; for example, when you put in a backslash followed by a single quote, \', it sets a switch indicating that the next character should have an acute accent added to it, if it is a vowel.

Here are instructions for enabling the U.S. International keyboard layout — or really, any keyboard layout of your choice — on selected operating systems. If you use a system that's not listed here and would be willing to help add it, or if you've found a mistake in the directions, please don't hesitate to let me know: contact@ellipsix.net.