Macroes (customize.txt)

Special Keys
Certain special keys may be intercepted by the operating system or the host machine, causing unexpected results. In general, these special keys are control keys, and often, you can disable their special effects. It is often possible to specify “control-keys” without actually pressing the control key, by typing a caret (‘^’) followed by the key. This is useful for specifying control-key commands which might be caught by the operating system as explained above.

Pressing backslash (‘\\’) before a command will bypass all keymaps, and the next keypress will be interpreted as an “underlying command” key, unless it is a caret (‘^’), in which case the keypress after that will be turned into a control-key and interpreted as a command in the underlying Angband keyset. The backslash key is useful for creating actions which are
not affected by any keymap definitions that may be in force, for example, the sequence ‘\\’ + ‘.’ + ‘6’ will always mean “run east”, even if the ‘.’ key has been mapped to a different underlying command.

The ‘0’ and ‘^’ and ‘\\’ keys all have special meaning when entered at the command prompt, and there is no “useful” way to specify any of them as an “underlying command”, which is okay, since they would have no effect.

For many input requests or queries, the special character ‘ESCAPE’ will abort the command. The ‘[y/n]’ prompts may be answered with ‘y’ or ‘n’, or ‘escape’.

Selection of Objects
Many commands will prompt for a particular object to be used. For example, the command to read a scroll will ask you which of the scrolls that you are carrying that you wish to read. In such cases, the selection is made by typing a letter of the alphabet (or a number if choosing from the quiver). The prompt will indicate the possible letters/numbers, and you will also be shown a list of the appropriate items. Often you will be able to press ‘/’ to switch between inventory and equipment, or ‘|’ to select the quiver, or ‘-‘ to select the floor. Using the right arrow also rotates selection between equipment, inventory, quiver, floor and back to equipment; the left arrow rotates in the opposite direction.

The particular object may be selected by an upper case or a lower case letter. If lower case is used, the selection takes place immediately. If upper case is used, then the particular option is described, and you are given the option of confirming or retracting that choice. Upper case selection is thus safer, but requires an extra key stroke.

Tangaria supports multiple customizations. These can vary from alternative methods for selecting objects, keymaps for different commands, changing the visuals (using graphical tiles), creating subwindows, and saving customizations for use on future characters.

User Pref Files (Keymaps)
The “Interact with keymaps” menu allows you to set up keymaps. Keymaps map a single keypress to a series of keypresses. For example you might map the key F1 to “maa” (the keypresses to cast “Magic Missile” as a spellcaster). This can speed up access to commonly-used features.

To set up keymaps, go to the options menu = and select “Edit keymaps” k.

Keymaps have two parts: the trigger key and the action. These are written where possible just as ordinary characters. However, if modifier keys (shift, control, etc.) are used then they are encoded as special characters within curly braces {}.

Possible modifiers are:

K = Keypad (for numbers)
M = Meta (Cmd-key on OS X, alt on most other platforms)
^ = Control
S = Shift
If the only modifier is the control key, the curly braces {} aren’t included. For example:

{^S}& = Control-Shift-&
^D = Control-D
Special keys, like F1, F2, or Tab, are all written within square brackets []. For example:

^[F1] = Control-F1
{^S}[Tab] = Control-Shift-Tab
Special keys include [Escape].

The game will run keymaps in whatever keyset you use (original or roguelike). So if you write keymaps for roguelike keys and switch to original keys, they may not work as you expect! Keymap actions aren’t recursive either, so if you had a keymap whose trigger was F1, including F1 inside the action wouldn’t run the keymap action again.

Keymaps are written in pref files as:

A:<action>
C:<type>:<trigger>
The action must always come first, `<type>` means ‘keyset type’, which is either 0 for the original keyset or 1 for the roguelike keyset. For example:

A:maa
C:0:[F1]
Tangaria uses a few built-in keymaps. These are for the movement keys (they are mapped to ; plus the number, e.g. 5 -> ;5), amongst others. You can see the full list in pref.prf but they shouldn’t impact on you in any way.

To avoid triggering a keymap for a given key, you can type the backslash (\) command before pressing that key.

Leave a Reply

Your email address will not be published. Required fields are marked *