====================================================================== =========================== KeyMacro v1.0 ============================ ================== * A macro key handler utility * =================== ====================================================================== 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. 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:, mxm.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. LAST MINUTE NOTE: ----------------- Some problems showed up when using KeyMacro 1.0 on an A1000 with Kickstart 1.3, so there is no guarantee that it will work on all Amigas. I am still trying to trace the problem back, but any help from YOU will be most appreciated. That's why the original source code is distributed along with the executable files. If you track the error, please tell me ASAP. Note that there is no source code available for the mxm.library yet, I am of the opinion that it should be released when it's complete. The library itself is still open for enhancements & additions, if you've got some useful subroutines you would like to have integrated into a shared library, mail them to me! 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 Professional 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 'Olsen' Barthel, MXM Brabeckstrasse 35 D-3000 Hannover 71 Federal Republic of Germany Permission hereby granted to re-distribute KeyMacro v1.0 in its entirety for non profit usage. REVISION HISTORY (most recent change first): -------------------------------------------- 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 ???