## Chapter 10. Macros

Macros are, in a way, similar to aliases. They allow you to send commands to the MUD in an easier way. Aliases allow you to associate commands with shortcuts (typing a three-letter command to send a much more complex command, for example). Macros allow you to associate a command with a keypress. You could associate, for example, F5 with the command `drink from fountain`, and then you would only need to press F5 to send that command to the MUD.

The commands need not be complex or big: you could associate the arrow keys with macros that send movement commands, and you would be able to move around the MUD using the arrow keys.

Macros consist of a `key` and an `action`. The `action` represents what is sent to the MUD when the macro is run. It can be a single command to send, several commands separated by `%;`, or something to be executed by Perl, if it starts with `/`.