<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Isthatadragon</id>
	<title>Dwarf Fortress Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dwarffortresswiki.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Isthatadragon"/>
	<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php/Special:Contributions/Isthatadragon"/>
	<updated>2026-06-02T10:41:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://dwarffortresswiki.org/index.php?title=Interface.txt&amp;diff=235255</id>
		<title>Interface.txt</title>
		<link rel="alternate" type="text/html" href="https://dwarffortresswiki.org/index.php?title=Interface.txt&amp;diff=235255"/>
		<updated>2018-02-25T17:17:21Z</updated>

		<summary type="html">&lt;p&gt;Isthatadragon: /* Key syntax */ corrected type, all REPEAT have an underscore, not a space&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quality|Superior|20:29, 30 April 2013 (UTC)}}&lt;br /&gt;
{{av}}&lt;br /&gt;
{{file|DF/data/init/interface.txt}}&lt;br /&gt;
See [[Controls]] for the default key binds.&lt;br /&gt;
__TOC__&lt;br /&gt;
==Key bindings==&lt;br /&gt;
'''Key bindings''' determine how the game responds to the user (you) pressing different keys on their keyboard, numberpad, laptop, whatever. &lt;br /&gt;
&lt;br /&gt;
To access the key bindings, start a game(or just edit [[Interface.txt#Vanilla interface.txt|interface.txt]]), then hit {{k|Esc}} - using the up/down arrows, highlight &amp;quot;Key Bindings&amp;quot; and hit {{k|Enter}}.  This then shows the various game mode/screen categories (and [[Macros]]) selecting one shows all of the bindable game commands in that category.&lt;br /&gt;
&lt;br /&gt;
On the left you see you see list of bindable commands and on the right side you see &amp;quot;Add binding&amp;quot; option the &amp;quot;Don't repeat&amp;quot;, &amp;quot;Delayed repeat&amp;quot; and &amp;quot;Immediate repeat&amp;quot; after that refer to what happens when you hold down the key, the one in red is selected and finally the ones starting with &amp;quot;By position:  &amp;quot; and &amp;quot;By letter:  &amp;quot; are the currently set binds of the command.&lt;br /&gt;
&lt;br /&gt;
For example if you wanted to add {{k|9}} to &amp;quot;Select&amp;quot; command(odd, but your choice) you would then select the General category, press right on the first command(Select) and hit {{k|Enter}} on the &amp;quot;Add binding&amp;quot; option to open a key registration prompt and then press {{k|9}} and select whether you want to bind [[#Differences_between_KEY_and_SYM|by position or by key]] and hit {{k|Enter}} or if you hit the wrong button {{k|Esc}}(or whatever you have set to &amp;quot;Main menu&amp;quot; or &amp;quot;Leave screen&amp;quot; keys) to abort. However, you'd then have to find any action that '''also''' is controlled by  {{k|9}}, or you'll be sending '''both''' commands every time you hit that key. Changes should be planned carefully with that last in mind. To remove the command you added select the &amp;quot;By letter: 9&amp;quot; or &amp;quot;By position: 9&amp;quot; or &amp;quot;By position: Numpad 9&amp;quot; on the select command with arrow keys and press backspace (your &amp;quot;String: Backspace&amp;quot; key) to delete the keybind.&lt;br /&gt;
&lt;br /&gt;
Additional commands can be viewed by scrolling using the up/down arrows, or by screen using the page up/page down keys (unless you've changed those).&lt;br /&gt;
&lt;br /&gt;
==Additional Up/Down Z-Level Keys==&lt;br /&gt;
&lt;br /&gt;
One of the more common key binding changes, is to use the comma {{k|,}} and period {{k|.}}, rather than {{k|&amp;lt;}} and {{k|&amp;gt;}} (the same keys + {{k|Shift}}) for up/down [[z-level]]s, thus avoiding the need to use two hands/keys for this common action. &lt;br /&gt;
&lt;br /&gt;
You'll need to add the following in the general category.&lt;br /&gt;
&lt;br /&gt;
 Move view/cursor up (z)                By position/letter: ,&lt;br /&gt;
 Move view/cursor down (z)              By position/letter: .&lt;br /&gt;
&lt;br /&gt;
''Then, also '''be sure''' remove'' the following entry from the dwarf mode, &lt;br /&gt;
&lt;br /&gt;
 Main: One-Step                          By letter: .&lt;br /&gt;
&lt;br /&gt;
This avoids advancing the game one [[Frames per second|step]] each time you move the game view &amp;quot;down&amp;quot; one [[z-level]], since both would be controlled by the {{k|.}} key.  But advancing one step would become unbound so you could use {{k|&amp;lt;}} or {{k|&amp;gt;}} or any other '''unused''' key for that.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some players may feel more comfortable by switching the PgDn/PgUp keys to control moving between z-levels, though this is not recommended should you use the numpad for movement.&lt;br /&gt;
&lt;br /&gt;
== Laptop Bindings ==&lt;br /&gt;
[[40d:Key_bindings#Laptop Bindings|40d version]] required some editing to use non-numpad versions of keys but this is no longer necessary so there are no longer any changes possible that could make laptop keyboards easier to use for playing DF.&lt;br /&gt;
&lt;br /&gt;
== Vanilla interface.txt ==&lt;br /&gt;
&lt;br /&gt;
{{gamedata}}&lt;br /&gt;
&lt;br /&gt;
== Key syntax ==&lt;br /&gt;
A key bindings block has this structure:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[BIND:Action:Repeat_Style]&lt;br /&gt;
[SYM:Modifiers:Key]&lt;br /&gt;
[KEY:Key]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is made of two parts:&lt;br /&gt;
*The &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; part, which defines what the key does,&lt;br /&gt;
*And the &amp;lt;code&amp;gt;SYM/KEY&amp;lt;/code&amp;gt; part, which defines which key the action is mapped to.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt;===&lt;br /&gt;
&amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; begins a block of key bindings for a specified action in the Key Bindings menu.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[BIND:Action:Repeat_Style]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; is followed by a block of one or more key bindings (&amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt;; see below) terminated either by the next &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; or by the end of file.&lt;br /&gt;
&lt;br /&gt;
The repeat style is given as one of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Repeat Style&lt;br /&gt;
! Behavior&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;REPEAT_NOT&amp;lt;/code&amp;gt;&lt;br /&gt;
| The action does not repeat at all; pressing the key performs the action exactly once, no matter how long it is held.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;REPEAT_SLOW&amp;lt;/code&amp;gt;&lt;br /&gt;
| The action repeats after a delay of [[DF2014:Technical_tricks#Keyboard|&amp;lt;code&amp;gt;KEY_HOLD_MS&amp;lt;/code&amp;gt;]] milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;REPEAT_FAST&amp;lt;/code&amp;gt;&lt;br /&gt;
| The action repeats immediately.&lt;br /&gt;
|}&lt;br /&gt;
It is not possible to specify key bindings with different repeat styles for the same action; if more than one &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; exists for the same action, the repeat style of the last &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; is used for all bound keys.&lt;br /&gt;
&lt;br /&gt;
Vanilla interface.txt already includes &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; entires for all valid actions. It is possible to remove all key bindings for a given action by removing all &amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt; entries after the action's &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt;, and (optionally) removing the &amp;lt;code&amp;gt;BIND&amp;lt;/code&amp;gt; itself. This, however, can result in frequent warnings output to the terminal if the game wants to display a key binding for the action (e.g. {{DFtext|;: Movies}} in the Dwarf Mode side bar; one can mitigate this by closing the side bar with {{k|Tab}}).&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt;===&lt;br /&gt;
&amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt; is used for keys listed as {{DFtext|By position}} in the Key Bindings menu.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;[SYM:Modifiers:Key]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The modifiers are represented as the sum of their codes listed below:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Modifier&lt;br /&gt;
! Value&lt;br /&gt;
|-&lt;br /&gt;
| Shift&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| Ctrl&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| Alt&lt;br /&gt;
| 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;code&amp;gt;[SYM:0:A]&amp;lt;/code&amp;gt; represents {{k|a}}, &amp;lt;code&amp;gt;[SYM:1:Enter]&amp;lt;/code&amp;gt; represents {{k|Shift}}-{{k|Enter}}, and &amp;lt;code&amp;gt;[SYM:6:Left]&amp;lt;/code&amp;gt; represents {{k|Ctrl}}-{{k|Alt}}-{{k|&amp;amp;larr;}}.&lt;br /&gt;
&lt;br /&gt;
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, &amp;lt;code&amp;gt;[SYM:0:]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[SYM:0::]&amp;lt;/code&amp;gt; cause errors instead of representing {{k|]}} and {{k|:}}), or when the symbol isn't type-able (it's hard to insert a backspace character in a basic text editor without deleting something).&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt; is a simpler version of &amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt;, only allowing plain keys (no modifiers). These are listed as {{DFtext|By letter}} in the Key Bindings menu.&lt;br /&gt;
&lt;br /&gt;
Syntax: &amp;lt;pre&amp;gt;[KEY:Key]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;code&amp;gt;[KEY:a]&amp;lt;/code&amp;gt; represents the {{k|a}} key.&lt;br /&gt;
&lt;br /&gt;
Unlike the above, the key must be given as an actual symbol. Entries such as &amp;lt;code&amp;gt;[KEY:]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[KEY::]&amp;lt;/code&amp;gt; work as one might expect, i.e., representing {{k|]}} and {{k|:}}, respectively.&lt;br /&gt;
&lt;br /&gt;
===Differences between &amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt; '''does''' allow special characters '''if''' they are able to be typed. For example, &amp;lt;code&amp;gt;[KEY:%]&amp;lt;/code&amp;gt; is equivalent to &amp;lt;code&amp;gt;[SYM:1:5]&amp;lt;/code&amp;gt;. Note that &amp;lt;code&amp;gt;SYM&amp;lt;/code&amp;gt; requires the key on the keyboard, while &amp;lt;code&amp;gt;KEY&amp;lt;/code&amp;gt; requires the letter generated.&lt;br /&gt;
&lt;br /&gt;
===Mac-specific===&lt;br /&gt;
* Some keys unavailable on the keyboard (such as {{k|PgDown}}) can be generated with the {{k|fn}} key. Dwarf fortress sees these as ''independent keys''; the {{k|fn}} key is essentially invisible to DF. There is no modifier code for {{k|fn}}.&lt;br /&gt;
* Characters like {{k|å}} aren't recognized when typed as {{k|alt}}-{{k|a}}.&lt;br /&gt;
* The {{k|Command}} key is unrecognized by DF and can't be used as a modifier.&lt;br /&gt;
&lt;br /&gt;
{{files}}&lt;br /&gt;
{{Category|Mods}}&lt;br /&gt;
{{Category|Interface}}&lt;/div&gt;</summary>
		<author><name>Isthatadragon</name></author>
	</entry>
</feed>