Documentation

#KEY

KEY

Syntax: #KE key {commands} class options

Assign commands 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 server, "chain" to allow macro daisy chaining.

Normally, the command is sent to the server 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 server. 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 server. Otherwise, if the command line doesn't end in a space, the macro command is just sent to the server as normal. See the Introduction to Macros for more information on macro chaining.

KEY examples

#KEY F1 {eat bread} {} {append|nosend}
assign the eat bread command to the F1 key
<ALT-D>={drink water}
assign the command 'drink water' to the ALT-D key

Add comment

Login or register to post comments