(*install macro executed after initially loading EditKeys*)
INSTALL ()
EditKeys 2.0 Documentation cas 9 May 92 / mh 19 Apr 94
EditKeys.Open ^ open a user viewer with macro facility
EditKeys.SysOpen ^ open a system viewer with macro facility
EditKeys.GetKeyHandler put EditKeys.KeyHandle into Oberon.Par.frame.handle if Oberon.Par.pos = -42
EditKeys.Upgrade exchange handle of marked textframe with EditKeys.Handle
"Copy Out Tool" for using EditKeys.
EditKeys.Definitions
EditKeys.Read EditKeys.Text ~
EditKeys.Reset
EditKeys.GetKeyCode
EditKeys.Definitions opens a viewer and lists all current macro definitions. A selection or a command parameter can be used to restrict the list to definitions with a certain prefix. EditKeys.Read takes a list of files and reads in macro definitions contained therein. If errors are detected, all definitions are deleted. For prototyping macros, it is also possible to have "@" or ":=" as an argument for EditKeys.Read, where @ causes the current selection to be read in, while := takes the text following. (Warning: in both cases the text is parsed to its end.)
Upon module load time, the standard macro definition file "EditKeys.Text" is read in. Also, if a macro "INSTALL" is defined, it is invoked. EditKeys.Reset deletes all current macro definitions, resetting the hotkey to its default.
EditKeys.GetKeyCode helps to find out the codes of certain keys. Within a text supporting macro keys, entering the hot key causes expansion of the macro entered to the left. To avoid ambiguouties, the longest matching macro name is taken. A macro may have zero or more arguments supplied by the user. If no corresponding definition of a macro is found, a second try is made with the standard macro name "OTHERWISE". (EditKeys.Reset defines "OTHERWISE" to write the default hotkey, i.e. "\".)
Syntax of macro definition files for EditKeys.
MacroFile = [HotKeyDef] {MacroDef}.
HotKeyDef = '\' KeyName. -- sets the macro expansion hot key (default is \)