|
|
@ -7,10 +7,10 @@ keybinding
|
|
|
|
|
|
|
|
|
|
|
|
Like any other command, it can be used at any time from the console, but
|
|
|
|
Like any other command, it can be used at any time from the console, but
|
|
|
|
bindings are not remembered between runs of the game unless re-created in
|
|
|
|
bindings are not remembered between runs of the game unless re-created in
|
|
|
|
`dfhack.init`.
|
|
|
|
:file:`dfhack-config/init/dfhack.init`.
|
|
|
|
|
|
|
|
|
|
|
|
Hotkeys can be any combinations of Ctrl/Alt/Shift with A-Z, 0-9, F1-F12, or
|
|
|
|
Hotkeys can be any combinations of Ctrl/Alt/Shift with A-Z, 0-9, F1-F12, or `
|
|
|
|
\` (the key below the :kbd:`Esc` key.
|
|
|
|
(the key below the :kbd:`Esc` key on most keyboards).
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
-----
|
|
|
@ -21,16 +21,17 @@ Usage
|
|
|
|
List bindings active for the key combination.
|
|
|
|
List bindings active for the key combination.
|
|
|
|
``keybinding clear <key> [<key>...]``
|
|
|
|
``keybinding clear <key> [<key>...]``
|
|
|
|
Remove bindings for the specified keys.
|
|
|
|
Remove bindings for the specified keys.
|
|
|
|
``keybinding add <key> "cmdline" ["cmdline"...]``
|
|
|
|
``keybinding add <key> "<cmdline>" ["<cmdline>" ...]``
|
|
|
|
Add bindings for the specified key.
|
|
|
|
Add bindings for the specified key.
|
|
|
|
``keybinding set <key> "cmdline" ["cmdline"...]``
|
|
|
|
``keybinding set <key> "<cmdline>" ["<cmdline>" ...]``
|
|
|
|
Clear, and then add bindings for the specified key.
|
|
|
|
Clear, and then add bindings for the specified key.
|
|
|
|
|
|
|
|
|
|
|
|
The ``<key>`` parameter above has the following **case-sensitive** syntax::
|
|
|
|
The ``<key>`` parameter above has the following **case-sensitive** syntax::
|
|
|
|
|
|
|
|
|
|
|
|
[Ctrl-][Alt-][Shift-]KEY[@context[|context...]]
|
|
|
|
[Ctrl-][Alt-][Shift-]KEY[@context[|context...]]
|
|
|
|
|
|
|
|
|
|
|
|
where the ``KEY`` part can be any recognized key and [] denote optional parts.
|
|
|
|
where the ``KEY`` part can be any recognized key and :kbd:`[`:kbd:`]` denote
|
|
|
|
|
|
|
|
optional parts.
|
|
|
|
|
|
|
|
|
|
|
|
When multiple commands are bound to the same key combination, DFHack selects
|
|
|
|
When multiple commands are bound to the same key combination, DFHack selects
|
|
|
|
the first applicable one. Later ``add`` commands, and earlier entries within one
|
|
|
|
the first applicable one. Later ``add`` commands, and earlier entries within one
|
|
|
@ -49,13 +50,18 @@ Multiple contexts can be specified by separating them with a pipe (``|``) - for
|
|
|
|
example, ``@foo|bar|baz/foo`` would match anything under ``@foo``, ``@bar``, or
|
|
|
|
example, ``@foo|bar|baz/foo`` would match anything under ``@foo``, ``@bar``, or
|
|
|
|
``@baz/foo``.
|
|
|
|
``@baz/foo``.
|
|
|
|
|
|
|
|
|
|
|
|
Interactive commands like `liquids` cannot be used as hotkeys.
|
|
|
|
Commands like `liquids` or `tiletypes` cannot be used as hotkeys since they
|
|
|
|
|
|
|
|
require the console for interactive input.
|
|
|
|
|
|
|
|
|
|
|
|
Examples
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
|
|
``keybinding add Alt-F1 hotkeys``
|
|
|
|
``keybinding add Ctrl-Shift-C hotkeys``
|
|
|
|
Bind Alt-F1 to run the `hotkeys` command on any screen at any time.
|
|
|
|
Bind Ctrl-Shift-C to run the `hotkeys` command on any screen at any time.
|
|
|
|
``keybinding add Alt-F@dwarfmode gui/quickfort``
|
|
|
|
``keybinding add Alt-F@dwarfmode gui/quickfort``
|
|
|
|
Bind Alt-F to run `gui/quickfort`, but only when on a screen that shows the
|
|
|
|
Bind Alt-F to run `gui/quickfort`, but only when on a screen that shows the
|
|
|
|
main map.
|
|
|
|
main map.
|
|
|
|
|
|
|
|
``keybinding add Ctrl-Shift-Z@dwarfmode/Default "stocks show"``
|
|
|
|
|
|
|
|
Bind Ctrl-Shift-Z to run `stocks show <stocks>`, but only when on the main
|
|
|
|
|
|
|
|
map in the default mode (that is, no special mode, like cursor look, is
|
|
|
|
|
|
|
|
enabled).
|
|
|
|