home *** CD-ROM | disk | FTP | other *** search
- ======================================================================
- =========================== KeyMacro v1.4 ============================
- ================== * A macro key handler utility * ===================
- ======================================================================
-
- ============================= IMPORTANT ==============================
- ======================================================================
- The current release of KeyMacro requires arp.library, mxm.library and
- Null-Handler to be present in your system. Put the libraries into
- LIBS: and the handlers into L:. Then add the following lines to
- DEVS:MountList:
-
- NULL: Handler = L:Null-Handler
- Stacksize = 500
- Priority = 5
- GlobVec = -1
- #
-
- You _M_U_S_T_ install the Null-Handler using the CLI command 'Mount
- NULL:' before starting KeyMacro or the KeyMacro handler won't budge.
-
- Secondly there's another pitfall to overcome: I don't know anybody
- else who has the Aztec 5.0 compiler update yet. And thirdly: I only
- know one Arp wrapper package which is compatible with the Aztec 5.0
- release: my wrapper.
- If you find a working wrapper for Lattice 'C' it may turn out
- quite easy to 're-port' the code.
-
- ============================ BACKGROUND ==============================
- ======================================================================
- Some time ago I played around with a keymap editor to customize my
- keymap settings. But there was a feature I missed: there wasn't any
- hot-key support (just like PopCLI or DMouse). I also discovered
- another disadvantage: to change the keymap settings you had to load
- the keymap editor, edit the map, save it to disk and then install it
- via SetMap - and even that didn't guarantee that the new keymap was
- accepted: do you remember that SetMap does not load new keymaps if
- the name matches a keymap already in memory? Furthermore keymap keys
- may only generate string sequences of up to 32 characters. With these
- topics in mind I decided to write my own keyboard macro handler.
-
- ============================= FEATURES ===============================
- ======================================================================
- KeyMacro provides an easy way to manage keyboard macros (character
- sequences) and hot-key program execution. You edit a script file in
- which all required key combinations are defined and call KeyMacro to
- update the macro list - that's all. You can map up to eight functions
- to each key, including keys such as the cursor keys, the return key,
- etc. The hot-key programs will use an AmigaDOS search path list when
- getting executed. Each macro key call gets processed asynchronously,
- i.e. invoking one hot-key command after the other will start all
- commands, nothing will be skipped.
-
- =========================== INSTALLATION =============================
- ======================================================================
- Place KeyMacro-Handler in L:, KeyMacro in C: or SYS:,
- electronic.library in LIBS:, copy your KeyMacro.config to S:. Type
- "KeyMacro" to install/update macro keys, "KeyMacro quit" to remove.
- Note: if the installation fails the main process ("KeyMacro") will
- wait for a handshake signal which may never arrive. In this case
- pressing CTRL-C will stop the main process. It will shut down and
- issue an error message.
-
- =============================== USAGE ================================
- ======================================================================
- KeyMacro is controlled via a script file. Here is a sample:
-
- ; KeyMacro v1.0 configuration file.
- ; The semicolon says that this is a comment:
-
- ; Some keyboard macros.
-
- key ctrl+esc = "EndCLI > NIL:\n"
- key lalt+0 = "CD DF0:\n"
- key lalt+1 = "CD DF1:\n"
-
- ; A hot-key command definition
-
- command lalt+v = "C:vt100 +i s:vt100.init" window "VT100"
-
- Each definition must be "key" or "command". "Key" means that the
- following definition will be a sequence of characters to be inserted
- into the input stream. "Command" means that the following definition
- will be the name and the arguments of a program to be executed.
- The macro type is followed by the key combination to be
- pressed to execute the macro definition. This combination consists of
- the keyboard qualifier and the key. An unlimited number of qualifiers
- are allowed. KeyMacro knows the following qualifiers:
-
- NONE .......... No qualifier (note: a qualifier MUST be given!)
- CTRL .......... The control key
- NUMPAD ........ The numeric pad
- LSHIFT ........ The left shift key
- RSHIFT ........ The right shift key
- LALT .......... The left alternate key
- RALT .......... The right alternate key
- LAMIGA ........ The left Amiga key (Commodore key)
- RAMIGA ........ The right Amiga key
-
- A qualifier must be given or the macro parser will panic; if you don't
- need a qualifier simply enter NONE as the qualifier.
- The qualifier is followed by the key to attach the macro
- expression to. This can be any key on the keyboard, including
- function keys, cursor keys, etc. If there is no ASCII value available
- for the key, you can take a name from the following list:
-
- TAB ........... The tabulator key
- ESC ........... The escape key
- SPACE ......... The space key
- RETURN ........ The return key
- ENTER ......... The enter key (numeric pad)
- DEL ........... The delete key
- BACKSPACE ..... The backspace key
- HELP .......... The help key
-
- LEFT .......... The cursor-left key
- RIGHT ......... The cursor-right key
- UP ............ The cursor-up key
- DOWN .......... The cursor-down key
-
- F1 ............ The function key #1
- F2 ............ The function key #2
- F3 ............ The function key #3
- F4 ............ The function key #4
- F5 ............ The function key #5
- F6 ............ The function key #6
- F7 ............ The function key #7
- F8 ............ The function key #8
- F9 ............ The function key #9
- F10 ........... The function key #10
-
- These equivalents can be used just like characters. Note: if you
- enter more than one single character as the command key only the first
- character will be taken (except for the key names listed above).
- The key is followed by a '=' sign, this tells the macro parser
- to remember the following string as the macro string to be
- entered/executed. This string must be enclosed in quotes or the parser
- will take only the first word of it. Inside this string sequences of
- two characters can be used to generate key codes not supported by the
- ASCII keyboard. These sequences are:
-
- \u ............ Cursor-up key
- \d ............ Cursor-down key
- \l ............ Cursor-left key
- \r ............ Cursor-right key
-
- \n ............ The return key
-
- \h ............ The help key
- \b ............ The backspace key
- \e ............ The delete key (sorry, \d was already used)
- \f1 - \f10 .... The function keys
- \" ............ A quote
- \\ ............ The escape symbol ('\')
-
- A hot-key command definition can be followed by a "window" keyword.
- This keyword identifies the next string (enclosed in quotes) as the
- typical window title of the command to be loaded. Before this command
- is executed each open window is checked for this title. If a window
- title matches the name it is brought to the front, no new command will
- be loaded.
-
- *
-
- KeyMacro has the following command-line options:
-
- STARTUP ....... Followed by the name of the file to be used as
- configuration file will keep KeyMacro from looking
- for S:KeyMacro.config as the standard configuration
- file.
-
- QUIT .......... Removes KeyMacro from memory.
-
- INFO .......... Gives a brief information on the program.
-
- ============================== CREDITS ===============================
- ======================================================================
- Credits go to ARP Programmers for the most recent version of ARP and
- to Matt Dillon for DMouse.
- A special mention must also go to Bill Hawes, author of ARexx,
- and to the authors of CygnusEd Pro 2 (Bruce Dawson & Colin Fox) whose
- programs both controlled the compiler runs.
-
- ================== COPY FEE, AUTHORS REQUEST, ETC. ===================
- ======================================================================
- This is the first time I release a program as shareware. Consider it
- as a "test balloon" for coming projects. A small contribution of at
- least $5 or at least DM 10,- will insure your registration, giving you
- the opportunity to receive updates, new programs from MXM and more.
- Think about it, if you like this program and use it often this small
- amount of money will support the author and encourage him to start new
- projects.
-
- Send comments, bug reports, ideas and contributions to:
-
- Olaf Barthel, MXM
- Brabeckstrasse 35
- D-3000 Hannover 71
-
- Federal Republic of Germany
-
- Permission hereby granted to re-distribute KeyMacro v1.4 in its
- entirety for non profit usage only.
-
- ============ REVISION HISTORY (most recent change first) =============
- ======================================================================
- V1.4 Wow! It works! The reasons for the constant failures were
- located in 1) mxm.library, 2) in the Arp wrapper for Lattice
- 'C', 3) in KeyMacro itself and 4) of course in
- KeyMacro-Handler. Needless to say, mxm.library was fixed and
- the code has once more changed the compiler - KeyMacro 1.4 now
- compiles under Aztec 5.0. Programs started by the
- executor-process will no longer block until the program exits.
- This is now probably the only input.device example program
- written in Aztec 'C' which doesn't use ANY inline assembly
- language code (#asm/#endasm).
-
- V1.3 Well, I wouldn't shoot my grandma to get it working, but it
- really starts to become a nuisance: 1.2 still wasn't the
- success I had expected. I took a second look into RKM Exec
- and discovered that interrupt handlers be located in public
- ram. As a result almost all static data declarations have
- been replaced by memory allocations.
-
- V1.2 I guess you know what happened: it still didn't work right.
- The code is now much more compact and has been recompiled
- using Lattice 'C' 5.04.
-
- V1.1 KeyMacro obviously worked on only one machine: my Amiga.
- This is the first attempt to fix it. I cleaned up the code I
- didn't think to be that much important which hopefully will
- fix the problem.
-
- V1.0 First public release; seems that it works (what did I do
- wrong?).
-
- *
-
- Do only its possibilities make it an Amiga?
-
- WHERE IS THE MAGIC ???
-