DIACRITICS IN OS/2 USING THE US KEYBOARD INTRODUCTION In OS/2, diacritics (a, e, i, o, c, etc.) can be produced by means of so-called "dead keys" (for the above examples these would be ['], [`], [^], ["], [~] and ['], respectively). This works just like the good old typewriter: strike a dead key and nothing happens until the next key is hit (in many cases OS/2 will cause the diacritical mark to appear, however, the cursor will not move). If the next key is a character which in combination with the dead key forms a valid combination, that combination is produced as output. A space will cause the normal value of the key to be produced. Any other combination will result in a beep to signal an error condition. This function is outlined in the booklet, "OS/2 Keyboards and Code Pages" supplied with OS/2. THE PROBLEM The simplest way to set up a keyboard with dead keys is to alter the line, "DEVINFO=KBD,..,...\KEYBOARD.DCP" in the CONFIG.SYS file to point to a "national" keyboard that provides the desired diacritical marks. The drawback of this approach -- at least according to the documentation -- is that this trick will only work if you use a special, national keyboard with the correct layout. If you don't have such a keyboard (and I'm assuming you don't), you're in trouble. For example, if you include the following line in CONFIG.SYS: "DEVINFO=KBD,BR,C:\OS2\KEYBOARD.DCP", you will be able to produce diacritics using dead keys, but you will also need to keep the documentation handy, as the Brazilian ("BR") keyboard layout differs quite a bit from the US layout. This is a bit cumbersome, to put it mildly. But surely, there must be another solution to this problem? Of course there is, read on. THE SOLUTION What the documentation does not reveal, is that an option has been provided to enable Brazilian users with a standard US keyboard to also create diacritics via dead keys. For this purpose, the keyboard table (the KEYBOARD.DCP file) includes an alternative Brazilian keyboard definition that incorporates all the diacritical combinations, but does not shuffle the keys around. Setting up this keyboard in CONFIG.SYS is done as follows: Replace the line, "DEVINFO=KBD,..,...\KEYBOARD.DCP" (for a standard OS/2 installation with a US keyboard this line reads in full: "DEVINFO=KBD,US,C:\OS2\KEYBOARD.DCP") with the line, "DEVINFO=KBD,BR274,C:\OS2\KEYBOARD.DCP" (without the quotation marks and with a different path for KEYBOARD.DCP if you didn't install OS/2 in C:\, but then you knew that already). Of course, you can also set this keyboard configuration from an OS/2 command line using the command, "KEYB BR 274", followed by [Enter] (again, leave out the quotation marks). Please note that in this case -- as opposed to the "BR274" parameter in CONFIG.SYS -- a space should be inserted between "BR" and "274"; if you leave out the space, the definition for the "real" Brazilian keyboard will be loaded and you'll be in for a surprise when you start typing. You can use the command, "KEYB US" to switch back to the standard keyboard without dead keys. The commands can be entered in a separate OS/2 session and will affect the entire system. This means that you could include a toggle key in the launchpad to switch back and forth between the two keyboard definitions. The number of available diacritics depends on which code page has been set. If you want the widest possible selection of diacritics, select code page 850; however, this means you will lose certain graphics characters used for text frames etc. If you can't do without the graphics, select code page 437, which will give you the standard IBM character set. See Chapter 3 of "OS/2 Keyboards and Code Pages" for more information. You can of course change from one code page to the other at any time using the command, "CHCP nnn", followed by [Enter], in which nnn represents either 437 or 850. A code page change affects only the OS/2 or DOS session in which the command is entered. To enable these code pages for subsequent use, they must be listed in CONFIG.SYS using the line, "CODEPAGE=850,437" or the line, "CODEPAGE=437,850". The first of the two parameters indicates the default code page on startup. SUMMARY To enable a full set of dead key diacritics in OS/2 with a standard US keyboard, the following two lines should be included/altered in CONFIG.SYS (assuming a standard OS/2 installation in C:\): DEVINFO=KBD,BR274,C:\OS2\KEYBOARD.DCP CODEPAGE=850,437 The following commands can be issued from the command line to change keyboard definitions and code pages, respectively: KEYB BR 274 [Enter] KEYB US [Enter] CHCP 850 [Enter] CHCP 437 [Enter] It's as simple as that. Now all we have to do is persuade IBM to include this setup as a "US International keyboard" option in the install program. Marcus de Geus 72124.2221@compuserve.com