Binds: Difference between revisions

From DDraceNetwork
No edit summary
No edit summary
Line 15: Line 15:


====Nested commands====
====Nested commands====
You can nest multiple quoted strings in a single line by escaping each new set of quotes with backslashes.
  bind <span style="color:green">[key]</span> <span style="color:red">"</span>bind <span style="color:green">[key]</span> <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:orange">\</span><span style="color:red">""</span>
  bind <span style="color:green">[key]</span> <span style="color:red">"</span>bind <span style="color:green">[key]</span> <span style="color:orange">\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span><span style="color:red">;</span> bind <span style="color:green">[key]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:blue">[command/setting]</span> <span style="color:purple">[value]</span> <span style="color:orange">\\\</span><span style="color:red">"</span><span style="color:orange">\</span><span style="color:red">""</span>

Revision as of 08:17, 30 July 2021

Syntax

Simple bind

bind [key] [command/setting] [value]

This is the basic syntax for simple binds.

  • [key] is the key on your keyboard/mouse you want to bind a command to. You can find keycodes here, or just type the key temporarily into one of the controls in the Settings > Controls page in DDNet client and it will show the key name.
  • [command/setting] A full list of all commands and settings can be found here.
  • [value] is the variable you want to set your setting to or an argument for a command. Not all commands require arguments.

Multiple commands/settings in one bind

You can also chain commands/settings together by separating them using a semicolon and wrapping them in quotes. You can add as many commands to this chain as you want.

bind [key] "[command/setting]; [command/setting]" [value]

Nested commands

You can nest multiple quoted strings in a single line by escaping each new set of quotes with backslashes.

bind [key] "bind [key] \"[command/setting] [value]; bind [key] \\\"[command/setting] [value] \\\"\""