
                             MJSoft's Keymap Tools

                 (c) 1994 Martin Mares, MJSoft System Software

================================================================================


Preface
=======

   KeyComp,  KeyRes, their documentation and ss.library are Copyright (c) Martin
Mares, MJSoft System Software, Prague, Czech Republic.

   This  archive  can  be  freely redistributed, as long as all of its files are
included   in   their   original   form  without  any  additions,  deletions  or
modifications,  and  no more than a nominal fee is charged for its distribution.
All  copyright notices in the programs and accompanying documentation files must
remain  on  their  places.  Also '.displayme' and other similar files may not be
added.  This is generally known as FREEWARE.

   This  software  is  provided  "AS  IS"  without  warranty of any kind, either
expressed  or  implied.   The author is not responsible for any damage caused by
it.


Introduction
============

   Keymaps, keymaps, keymaps. Problems, problems, problems.

   There is no sufficiently smart tool allowing complex manipulation with Amiga
keymap files. This package contains KeyRes -- the keymap resourcer that converts
a keymap to human-readable source file and KeyComp -- the keymap compiler that
takes such a source and compiles it to standard binary keymap file.

   Both KeyComp and KeyRes are pure and can be made resident.


Requirements
============

   - These tools requires Kickstart 2.04 or higher and the ss.library version
5.0 or higher (included in this archive, see SSLib<???>.lha on the AmiNet for
full distribution).


KeyRes
======

Syntax: KeyRes <from> [<to>]

  from - name of keymap to be disassembled. It can be stored in RAM or on
         a disk.
    to - name of file to store the output to. Default is <from>.kms.

Keymap source file is a sequence of key definition blocks, which have the
following syntax:

[<KEY TYPE>] KEY <NAME> [{<QUAL>}] [CAPS]
<followed by several lines of key meanings>

  Key type - can be DEAD, STRING or empty
      Name - key name (described below)
      Qual - qualifiers affecting processing of this key (SHIFT, ALT, CTRL)
      CAPS - set if CAPS LOCK act as SHIFT

Key names:

TILDE, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, ZERO, MINUS,
EQUAL, BACKSLASH, K0, Q, W, E, R, T, Y, U, I, O, P, LBRACK, RBRACK, K1, K2,
K3, A, S, D, F, G, H, J, K, L, SEMICOLON, APOSTROPHE, HASH, K4, K5, K6,
LESS, Z, X, C, V, B, N, M, COMMA, DOT, SLASH, KDOT, K7, K8, K9, SPACE,
BACKSPACE, TAB, KENTER, ENTER, ESC, DEL, KMINUS, UP, DOWN, RIGHT, LEFT, F1,
F2, F3, F4, F5, F6, F7, F8, F9, F10, KLBRACK, KRBRACK, KSLASH, KASTERISK,
KPLUS, HELP, LSHIFT, RSHIFT, CAPSLOCK, CONTROL, LALT, RALT, LAMIGA, RAMIGA.

Key meaning:

Normal keys		[<QUAL>] '<character>' | <character code>
			   |		|
			   |		*--- character generated by this key
			   |
			   *-- qualifiers of this meaning (SHIFT,ALT,CTRL)
			   |
String keys		[<QUAL>] "<string>"
			   |	     |
			   |	     *--- string generated by this key
			   |			use "" or \" for double quotes
			   |			use \cc for hex. char. code
			   |
			   |
Dead keys		[<QUAL>] '<character>' | <character code>
			   |		|
			   |		*-- code of meaning not affected
			   |		    by prefix (dead) keys
			[<QUAL>] PREFIX <num>
			   |		  |
			   |		  *-- # of prefix generated by this key
			[<QUAL>] PREFIX <p1>,<p2>
			   |   used if prefix has to be pressed twice to get
			   |   some other meaning. In this case, the final
			   |   prefix code is <p1_of_first_prefix> *
			   |   <p2_of_second_prefix> + <p1_of_second_prefix>.
			[<QUAL>] MOD { '<char>' | <code> , ... }
					|
					*-- meaning modified by dead keys
					    contains list of characters -
					    - for each prefix code one char.


KeyComp
=======

   Keymap compiler - does reverse process to KeyRes. Useful for creating
of keymaps in non-interactive way.

Syntax: KeyComp <source> [<dest>]

   source - source file (.kms is appended if there's no extension in it)
     dest - destination file (if omitted, source file name without extension
	    is substituted)


Notes
=====

   Send suggestions, flames and bug reports to <mjsoft@k332.feld.cvut.cz>.

