v0.34:Key bindings

From Dwarf Fortress Wiki
Jump to navigation Jump to search
This article is about an older version of DF.

Vanilla interface.txt[edit]

Key syntax[edit]


SYM is used for keys listed as By position in the keybinding menu.



The modifiers are represented as the sum of their codes listed below:

Modifier Value
Shift 1
Ctrl 2
Alt 4

For example, [SYM:0:A] represents a, [SYM:1:Enter] represents Shift-Enter, and [SYM:6:Left] represents Ctrl-Alt-.

The key can be any letter or number, or can be listed by name. This is useful when typing the actual symbol would cause a syntax error (for example, [KEY:0:]] and [KEY:0::] cause errors instead of representing ] and :), or when the symbol isn't type-able (it's hard to insert a backspace character in a basic text editor without deleting something).


KEY is a simpler version of SYM, only allowing plain keys (no modifiers). These are listed as By letter in the keybinding menu.



For example, [KEY:a] represents the a key.

Differences between KEY and SYM[edit]

KEY does allow special characters if they are able to be typed. For example, [KEY:%] is equivalent to [SYM:1:5]. Note that SYM requires the key on the keyboard, while KEY requires the letter generated.


Some keys unavailable on the keyboard (such as PgDown) can be generated with the fn key. Dwarf fortress sees these as independent keys; the fn key is essentially invisible to DF. There is no modifier code for fn.

Characters like å aren't recognized when typed as alt-a. This is probably an issue in SDL.

The Command key is unrecognized in DF and doesn't have a modifier. Pressing Command-h displays the hauling menu, even though this keystroke should hide DF and is listed in the menu at the top of the screen.