home *** CD-ROM | disk | FTP | other *** search
- *************************************************************************
- * >Commands Help on command syntax *
- *************************************************************************
-
- This gives details of the syntax you must use when typing a command into the
- 'keys' file or at the ctrl-Escape prompt. The file 'HelpData' contains a list
- of all the valid commands in the Zap and ZapBasic modules. The file
- 'E-Command' gives technical details on how to write your own commands.
- Also, see section C of the 'ReadMe' file.
-
- Syntax
- ======
-
- Command names are not case sensitive when typed into the keys file. Each
- command can take a parameter. The four types of parameter will be indicated
- after the command in the following way:
-
- WIBBLE Command Wibble takes no parameter
- WIBBLE <byte> Command Wibble takes a single byte
- WIBBLE <word> Command Wibble takes a word (4 bytes)
- WIBBLE <string> Command Wibble takes a string argument
-
- When you type the command into the keys file, or at the 'Command:' prompt,
- you type the command name, followed by a space and its parameter. Byte and
- word parameters must be preceded by an '&' if in hex. String parameters must
- be in double quotes. Double quotes can be included in strings by doubling
- them up. 'x' (single quotes included) is evaluated to the ascii value of the
- character x.
-
- An error is given if the parameter you place after the command does
- not match the type of the command. There are several special cases:
-
- 1 If the command takes a string parameter, but you omit the string, then a
- minibuffer will be opened for you to type the string into when the command
- is executed. For example, see the command SEARCHFORWARD (Ctrl-S).
-
- 2 If the command takes a byte or word parameter and you specify 'n' as the
- parameter, then the keynumber of the key you bind the command to is
- substituted for the 'n'. For example, see the command CHAR.
-
- 3 The '*' command. This is used for duplicating a range keypad entries.
- The format of the command is *n where n is optional. 'n' is the key code
- (or first key code of a list) of the key (or keys) to copy.
- It is of the form &yy0xxx where yy is the keymap number and xxx the key
- number. The default value of n is the current key being bound in keymap
- 0 (ie with yy set to 00).
- Eg the line "&20170-&2017F *&40" will cause keys &170-&17F in keymap
- 2 to have their definitions copied from keys &40-&4F of keymap 0.
-
- 4 If you type a command into a keys file and it doesn't exist, then no error
- will be given. This is so you can put commands in your keys file for
- extension modes that may not always be loaded. However, if a command does
- exist but its parameters are incorrect, then an error will be given.
-
- 5 If you define a key twice, then the later one will be used. Ie, the keys
- file is read sequentially and new definitions overwrite the old ones.
-
- Commands can be chained together by use of the separator ':' as in BASIC. You
- may NOT chain together commands which use the minibuffer (ie commands which
- take a string as parameter but with the string unspecified). The two commands
- BASEMAP and KEYMAP provide a means of swapping from one keymap to another and
- for providing multiple key press commands as you get in Emacs. See the Emacs
- keymap for examples of their use.
-
- Examples:
-
- (1) &020-7E CHAR n
- (2) &013 SEARCHFORWARD
- (3) &131 BASEMAP 1
- (4) &10018 KEYMAP 2
- (5) &10150-&101FF *
- (6) &132 INSERT "Hello" : UP : RIGHT
- (7) &133 insert " ""hello"" "
- (8) &120 CHAR '('
-
- In (1), key &20 (space) is assigned the command CHAR &20, key &21 (!) is
- assigned the command CHAR &21 etc. In (2), no string is given after
- SEARCHFORWARD, so you are prompted for it when you press cS. (3) Ensures all
- further keypresses are looked up in keymap 1, thus switching to Emacs
- emulation mode. (4) Switches to keymap 2 for the next key press only, thus
- allowing for two-key commands beginning with ctrl-X. In (5), keys &150-&1FF
- in keymap 1 are assigned to the same commands they have in keymap 0. (6)
- inserts the string "Hello" into the file and then moves up then right. (7)
- inserts the string ' "Hello" ' delimited by the single quotes. (8) Inserts a
- left bracket.
-
-