Macros
A macro is a key that does something when you press it. For example, press 5 on the number pad and Merlin sends look to the game. The key does its job instead of typing a number.
Find your macros in Settings > Macros.
Add a macro
- Go to Settings > Macros.
- Click the Key field, then press the key or key combination you want.
- In the Action field, type what the key should do.
Merlin saves each change as you make it.
To remove a macro, click the Delete button (the trash can) at the end of its row.
Macros are always listed in the same order:
- Plain keys: numbers, then letters, then the number pad, then function keys
- Keys pressed with Shift
- Keys pressed with Ctrl
- Keys pressed with Alt
- Keys pressed with Cmd
What a macro can do
A macro sends one line, exactly as if you typed it and pressed Enter. Usually that’s a game command, such as look or north.
Do several things with one key
To make one key do several things, put the steps in a script and have the key run it. To run a script, type a period followed by its name.
For example, if your script is called Hunt, set the key to send .hunt. When you press the key, it runs the whole script.
Note: A macro can’t run script lines such as pause 2 by itself; the game just receives the words. Use a script for those.
To learn how to write scripts, see the Scripting Manual.
When a macro works
Whether a macro works depends on the kind of key and what you’re doing at the time.
- Plain keys work when you’re not typing. A letter, number, punctuation key, Space, or editing key such as Backspace, with or without Shift, works only when the command line isn’t selected. While you’re typing in the command line, those keys type. To use them as macros again, click the game text above the command line.
- Number pad keys work even while you’re typing. This lets you walk with the number pad in the middle of a sentence. To have the number pad type numbers instead, turn off Allow NumPad macros in the command line at the top of the Macros pane.
- Keys with Ctrl, Alt, or Cmd work anywhere, even while you’re typing. Text fields don’t use those combinations, so they’re free. Shift alone doesn’t count; Shift with a letter still types a capital letter.
- Arrow keys work only when the command line is empty, or after you click the game text. If there’s text in the command line, the arrow keys move through the text instead, with or without Shift, Ctrl, Alt, or Cmd. To use them as macros again, press Esc to clear the command line.
- No macros work while a dialog is open, or while you’re in a menu, dropdown, text field, or the tabs. Those need the keys for themselves.
- Holding down a key runs the macro once. Leaning on a key won’t send the same command over and over.
Combinations that always work while typing
For a macro that works even while you’re typing in the command line, use one of these combinations:
| Platform | Combination | Except |
|---|---|---|
| macOS | Shift+Cmd+ a letter or number | Z, Q, 3, 4, and 5 |
| Windows | Ctrl+Shift+ a letter or number | I |
| Linux | Ctrl+Shift+ a letter or number | I and Z |
| Windows and Linux | A function key | F10 and F11 |
The exceptions are reserved by the operating system or by Merlin.
Keys you can’t use
Some keys never reach Merlin because the operating system takes them first. The Macros pane doesn’t warn you about these keys. If you assign one and it never works, that’s why. The known keys are the exceptions in the table above.
Other keys are allowed but don’t work while you’re typing, as described in When a macro works.
Note: The Macros pane does check for keys you’ve already used. If two macros share a key, both rows turn red, and only one fires until you change one.
Edit the macros file
Macros are stored one per line in the plain-text file macros.txt. You can edit it by hand, and Merlin keeps the file and the Macros pane in sync.
Find it in the game’s Config folder inside your Merlin folder:
| Platform | Location |
|---|---|
| macOS | ~/Library/Merlin |
| Windows | %APPDATA%\Merlin Files |
| Linux | ~/Documents/Merlin |
- Key names: When you edit the file by hand, you can use any order and any spelling Merlin recognizes. For example,
Shift+Ctrl+Nis the same asCtrl+Shift+N, andArrowUpis the same asUp. The Macros pane shows them in Merlin’s own spelling. - Comments: A line beginning with
//is a comment. Merlin skips it when it reads the file.
Important: Merlin doesn’t keep comments. The next change you make in the Macros pane rewrites the whole file with only the macros in it, so keep any notes you want to save somewhere else.