
     _  _ ____ _   _ ___  ____ ____ ____ ___     ____ ____ ___ _  _ ___
     |_/  |___  \_/  |__] |  | |__| |__/ |  \    [__  |___  |  |  | |__]
     | \_ |___   |   |__] |__| |  | |  \ |__/    ___] |___  |  |__| |


			   by Shawn Hargreaves



The Allegro keyboard module contains a default set of mapping tables for the 
US keyboard layout. Other keyboard types are supported by loading an 
alternate set of mappings from an external configuration file (either a 
seperate file or a member object in keyboard.dat), which is specified by 
setting the "keyboard=" parameter in allegro.cfg. The end user should simply 
be able to place a copy of keyboard.dat into the same directory as their 
program, and then select whichever of the preset layouts they would like to 
use. If there is no mapping table for your keyboard type, though, you will 
have to use this program to create one. Having done so, please send me a 
copy so I can include it in future versions of Allegro!

When you load the keyconf utility, the standard US mappings will be 
selected. If you want to start from one of the other layouts, use the 
grabber to export the mapping you want from keyboard.dat into a .cfg file, 
and then load this file into keyconf.

There are several mapping tables, listing what ASCII codes correspond to 
each hardware scancode for various states of the ctrl/shift/alt keys. Select 
each table in turn from the Edit menu, double-click on the key that you want 
to alter, and then select the ASCII character that it should be mapped onto. 
Press ESC to exit back to the previous screen. The different tables are:

Normal
   The regular set of ASCII characters for use when no modifier keys are 
   pressed. This table must be set correctly!

Capslock
   Uppercase ASCII characters for use when the capslock function is engaged. 
   This table must be set correctly!

Shifted
   Uppercase ASCII characters and alternate versions of the numeric and 
   punctuation keys, for use when the shift key is held down. This table 
   must be set correctly!

Control
   Control codes, for use when the control key is held down. This should 
   contain the numeric indexes of the ASCII keys, eg. A=1, B=2, C=3, etc. 
   You will not normally need to edit this table, unless some of the 
   alphabetic characters have been mapped onto different keys.

Alt-GR
   Alternate ASCII codes for use when the Alt-GR key is held down. Any keys 
   that don't behave specially in this context should be mapped to zero.

Accent*
   Lists of accented ASCII characters. There are two accent escape keys, 
   which can be selected from the Misc menu (set them to zero if your layout 
   has no accent keys). These keys can be pressed with and without the shift 
   key, giving a total of four different accents, which are applied on top 
   of whatever character is pressed immediately after the accent. These 
   eight tables list the mapping codes for both accent keys with and without 
   shift held down, and in normal (lowercase letter typed after the accent) 
   and caps (uppercase letter typed after the accent) forms. Any characters 
   that don't support the accent should be mapped onto zero.

When everything is working properly, save your new layout into a .cfg file. 
To use the new mapping, set the "keyboard=" parameter in allegro.cfg to the 
name of this .cfg file (just the basename is enough, without the .cfg 
extension). You can also use the grabber to add your new layout to the 
keyboard.dat file, after which you will be able to delete the original file 
(Allegro will automatically look in keyboard.dat if it doesn't find the 
mapping in a seperate file). Then fire up your favourite email program, and 
send me a copy of the new layout...

