Using Keyboard Drivers for Foreign and Special Characters in Word Processing


Topics:

  1. A Little Technical Background
  2. Installing a Foreign Keyboard
  3. Selecting a Keyboard
  4. Using Foreign Keyboards


The most direct way to work with foreign-language documents in Windows is to convert your system to that language. Fortunately, through the use of keyboard drivers you can change your computer from one language to another with a fair amount of ease.

I am fond of pointing out that computers are so dumb that they have to be told everything to do. This is especially true when it comes to keyboards. Your computer doesn't know what's printed on those keys. It has to be told what letter or function each single key represents. The program that does this is called a keyboard driver. The keyboard driver assigns character values to each key and it can assign any value it wants. Read the following section, A Little Technical Background, for a more complete explanation. A large set of keyboard drivers have been included with Windows that can implement keyboard layouts for several different nationalities.

If you bought your computer in the USA, it most likely arrived with the U.S. English keyboard driver installed, which causes the computer to interpret the keys according to the U.S. English keyboard layout. If you were to load the German keyboard driver, then the computer would interpret the keyboard according to the German keyboard layout, in which the "Y" and the "Z" change places, a number of special characters move to different keys, and certain keys serve a secondary function of placing the Umlaut over a vowel. If you were to load the French keyboard driver, then almost all the keys would be different. And if you want to stick with English, but you hate QWERTY, you could load the Dvorak keyboard driver. And so on.

Which immediately brings us to the main problem with and disadvantage of using a foreign keyboard driver: you need to know what the new layout is. Unfortunately, the last time I saw Microsoft provide a foreign keyboard layout was in the MS-DOS 6.22 manual which shipped with Windows 3.1. And for some keyboards, such as the Russian or Greek, a keyboard layout was not provided, so the user must experiment with it and discover the layout on his own. Fortunately, a number of articles in Wikipedia include graphics of keyboard layouts, but you need to hunt around for the one you want. I provide two keyboard layouts as examples at the bottom of this page.

Another disadvantage to using a foreign keyboard is that some standard English characters are no longer available, such as the Spanish keyboard's lack of the "<" and the ">". While the Spanish layout does show a key for these two characters, that key does not exist physically on the remapped US keyboard (see the Spanish keyboard layout below, between the Left Shift and the Z keys), so to use those characters you must revert to the English keyboard (or to another language's keyboard whose keys for those characters do physically exist). Fortunately for users of Windows 95 and later, that system allows for very quick and easy switching between keyboards. Unfortunately for Windows 3.1 users, the procedure for switching is more involved and more painful, assuming anyone is still using Windows 3.1.


A Little Technical Background

If the idea of a keyboard driver doesn't make sense to you yet, I'd like to offer a brief technical explanation. This is just some background information that isn't absolutely necessary to use keyboard drivers, so if you aren't technically minded or your eyes glaze over easily, you can skip this section. Otherwise, sit back and geek out a bit.

The following information is based on what I had learned in my MS-DOS days when the entire system was open for us to explore and to play with. While the details may have changed in the meantime, the ideas should still be the same.

In the first IBM PCs, the keyboard was a separate device with its own microprocessor, an 8048 (I programmed 8048-based devices in a past job; it is one of Intel's less powerful microprocessors). The keys were all wired together in rows and columns and the 8048 would scan those rows and columns in order to detect when a key had been depressed ("Make") and when a key had been released ("Break") -- the row/column intersection was a scan code that uniquely identified that key and the depression or release of a key was an event. When either a make or a break event happened, the 8048 would send a keyboard interrupt (INT 16H or INT 09H) to the PC with the event, the scan code, and some other data (eg, whether the shift, control, or alt keys are depressed). The PC's Keyboard Interrupt Handler would convert the scan code to an ASCII code, if it's a character key (eg, "a", "8", "/"), or to a function code, if it's a function key (eg, Insert, Home, F1). Then the Keyboard Interrupt Handler would update the keyboard buffer as appropriate and the keyboard status.

The role of the keyboard driver is to provide the Keyboard Interrupt Handler with data tables for converting scan codes to ASCII or function codes and other information on how some keys need to be handled (eg, dead keys -- see below in Using Foreign Keyboards). The keyboard driver for the US English keyboard tells your PC how to interpret the scan codes it receives from your keyboard, such that when you press the "k" key, it generates an ASCII code of 107, which means "k". If you had the driver for the Dvorak keyboard installed instead, pressing the "k" key (as physically printed on a standard US English keyboard) would cause the same scan code to be sent to the PC, but the PC would convert it to an ASCII code of 116 for a "t". Thus, by having the PC use a different keyboard driver, you can change how the PC interprets any key on the keyboard. In other words, the meaning and behavior of the keys on the keyboard are programmable with the keyboard driver being the program.

That is our goal in using this method. By installing keyboard drivers for other languages and then commanding Windows to switch to that other driver, we are having Windows interpret the keyboard keys as being keys on that foreign keyboard.

While we're on the subject of the Keyboard Interrupt Handler, I'd like to mention an old staple from the MS-DOS days, the Terminate and Stay Resident (TSR) program. These were those pop-up utilities that we would run under DOS. Windows 95 made TSRs unnecessary and then later simply impossible as Windows started to protect itself against the user -- if you feel insulted by that, stop and consider how many times a day you would crash MS-DOS without really trying.

Normally, DOS only allowed us to run one program at a time. When you'd run a program, DOS would allocate memory for it, load it into memory, and run it and then, when the program terminated, DOS would remove the program from memory making room for the next program. A TSR program used a special termination command that kept it in memory after it terminated, hence "terminate and stay resident". When you ran it, it would attach itself to some of the system interrupt vectors, most notably the Keyboard Interrupt Vector (ie, the memory location in the Interrupt Vector Table containing the address of the Keyboard Interrupt Handler). Then every time the keyboard sent a keyboard interrupt, the TSR would call the Keyboard Interrupt Handler and then examine what the Keyboard Interrupt Handler converted the scan code to. If the converted value was the keystroke to activate the TSR, then it would pop up and you could use it. Otherwise, the TSR just remained dormant.

Go to Top of Page


Installing a Foreign Keyboard

You can install a keyboard driver to change your keyboard's layout to that of another language. These drivers come with the Windows operating system, so there's nothing extra to buy. They are available for Windows 3.1, for Windows 95 to Windows 10, and even for MS-DOS, though the installation procedure seems to change for each new version of Windows, like everything else. Still, for Windows 95 through Windows 7, the general structure of the procedures appear to be similar enough that if you know it for one version then you should be able to figure out the others. It changed somewhat for Windows 8 and again for Windows 10.

The main point to remember here is that, while you always need to install the keyboard, starting in Windows 95 you only have to install the keyboard once. Compare that to Windows 3.1, where you had to install it every time you wanted to use it, then re-install the English keyboard in order to "switch back" to it. We have it good nowadays.

Go to Top of Page


Selecting a Keyboard

In Windows 3.1 and MS-DOS, the only way to select a different keyboard is to install it each and every time you want to switch to it. This is hardly appropriate for on-the-fly keyboard switching, especially since MS-DOS also required you to reboot.

However, in Windows 95 and later you can switch from one keyboard to another very quickly and at almost any time, even in the middle of a document and even between documents (ie, have one document use one keyboard and another document use another at the same time). The following procedure assumes that the "Enable Indicator On Taskbar" and "Switch languages" options are selected on the Languages tab of the Keyboard Properties sheet -- actual dialog boxes and settings may vary between Windows versions, so you may need to play with it:

    Select a Language
  1. Click on the language indicator in the Language Bar (a blue square with a two-letter abbreviation for the current language; eg, EN for English, DE for German (Deutsch), ES for Spanish (Español)). This pops up a list of the keyboards installed. The current one is checked.
  2. Click on the keyboard you want to use.
or
  1. Use the selected keystroke for switching languages (eg, Left Alt+Shift). Observe the language indicator to see that it has stepped to the next language installed.
  2. Repeat until the desired language has been selected.
Couldn't be much easier.

It's even simpler when you switch between alternative keyboards for the same language; eg, US and US International. Select a Variant Keyboard In that case, a keyboard icon is added on the Language Bar to the right of the language indicator -- if only one keyboard is installed for that language, then that space is blank. You simply click on the keyboard icon to display the options (the current one will be checked) and then click on the one you want to change to.

Go to Top of Page


Using Foreign Keyboards

Since loading a foreign language keyboard changes the keyboard's layout, actually using that keyboard for the most part only entails typing with the knowledge of which keys will now produce the characters you want. However, most of the other keyboards change a number of keys, mostly punctuation marks and special symbols, but also some fairly drastic rearranging of the letter keys, especially in the French keyboard.

To make matters worse, it can be difficult to get documentation on the layouts. The last time I saw Microsoft provide documentation of foreign keyboard layouts was in the MS-DOS 6.22 manual which shipped with Windows 3.1 (historical note: prior to Windows 95, Windows ran on top of MS-DOS). The best that I can recommend is to search Wikipedia for your keyboard's layout; they're in there, but sometimes the search keywords seem to defy logic. Failing that, you can create your own layout map by typing every key in sequence, row by row. You will also have to test for some special behavior of some of these other keyboards that I will describe below.

Some of the special behavior of foreign keyboard drivers is:

Dead Keys
A "dead key" is one that has no apparent effect when you press it, but rather it changes the next key pressed. Dead keys are normally used to add accents to vowels. On keyboard layouts such as below, dead keys are indicated in red.

For example, to type an "é" on the Spanish keyboard:

  1. Press the acute accent dead key, ' on the Spanish keyboard (on your physical US English keyboard that would be the "[" key -- see graphic below). Apparently, nothing happens.
  2. Then press the letter "e". The accented letter "é" appears.

If pressing a dead key is followed by pressing a key whose character cannot take that accent, such as a "%", then the accent will appear alone, followed by the second character; e.g., "%" and "^%".

Alt-Gr
There are two Alt keys on the keyboard. "Alt-Gr" refers to the Alt key on the right. On many foreign keyboards, the Alt-Gr key allows a third or fourth character to be assigned to some of the keys. These characters are usually special symbols; eg, the Spanish keyboard's "Alt-Gr q" is a "@" and the German keyboard's "Alt-Gr m" is a "µ". On keyboard layouts such as below, "Alt-Gr" keys are indicated in blue.


Sample Keyboard Layouts from Wikipedia's QWERTY article (follow links to get full-size graphic files, plus layouts for other languages):

The Latin American Spanish Keyboard:

The Latin American Spanish Keyboard

Please note the "<"/">" key next to the left shift key. Also compare the Spanish left shift key with the US left shift key below. Because the US left shift key is wider than the Spanish one, that Spanish "<"/">" key simply does not exist physically on a US keyboard. Even though the Spanish keyboard has a key for the characters "<" and ">", a US keyboard has no physical key to map to when using a Spanish keyboard driver. Therefore, if you set your US keyboard to use the Spanish keyboard driver, you have no direct access to those two characters. While that may normally not be a problem, it can be devastating if you're trying to write HTML in Spanish.

The US-International Keyboard:

The US-International Keyboard

In general, this keyboard is ideal for an American to have access to special characters, since all you have to learn is where the special characters (in blue) are. Though working around the dead keys (in red) for normal quoting can be irritating at times.

Go to Top of Page


Return to DWise1's Foreign and Special Characters in Word Processing Page

First uploaded on 2000 March 20.
Last updated on 2016 November 21.

Contact me.