KEY

Syntax: #KE key command [class] [options]

Assign a command to a key. key should be the full name of the key, for example, F1, or CTRL-A, or ALT-F2.

As an alternative syntax, you can use <key>=command as an assignment statement. class is the name of the class to assign the key to. If omitted or blank, the default class is used. Options is a string list of values to set special options for the macro key. Valid option values are: "append" to append the command to the command line, "nosend" to prevent the command from being sent to the MUD, "chain" to allow macro daisy chaining.

Normally, the command is sent to the MUD and the command line is not touched. If the Append option is set, the command will be appended to the current text in the command line. Usually, when using the "append" option you will also use the "nosend" option to prevent the text from also being sent to the MUD. The "chain" option is a special case where the command is appended to the command line only if it ends with a space character. In this case, the command is appended to the command line and then the whole command line is sent to the MUD. Otherwise, if the command line doesn't end in a space, the macro command is just sent to the MUD as normal. See the Introduction to Macros for more information on macro chaining.

KEY examples

#KEY F1 {eat bread}
assign the eat bread command to the F1 key
 
<ALT-D>={drink water}
assign the command ‘drink water’ to the ALT-D key


Contents INPUT KILLALL