Bind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Consistency, removed pointless bind link)
m (Syntax)
Line 1: Line 1:
This is a [[console command]] that lets you bind other console commands to a key. The basic syntax for bind is: <code>bind "key" "function"</code>
This is a [[console command]] that lets you bind other console commands to a key.
----
----
'''Syntax:''' <code>bind "key" "function"</code><br/>
'''Example:''' If you wanted to make the '''H''' key say ''"Hello."'' in chat, you would type in console: <code>bind "h" "say Hello."</code>
'''Example:''' If you wanted to make the '''H''' key say ''"Hello."'' in chat, you would type in console: <code>bind "h" "say Hello."</code>


Quotation marks around strings are not always required, but should be used to ensure that special characters, such as spaces and semicolons, are not misinterpreted.
Quotation marks around strings are not always required, but should be used to ensure that special characters, such as spaces and semicolons, are not misinterpreted. For number-only strings, quotation marks should not be used.
[[Category:Console Commands]]
[[Category:Console Commands]]

Revision as of 23:19, 21 December 2005

This is a console command that lets you bind other console commands to a key.


Syntax: bind "key" "function"
Example: If you wanted to make the H key say "Hello." in chat, you would type in console: bind "h" "say Hello."

Quotation marks around strings are not always required, but should be used to ensure that special characters, such as spaces and semicolons, are not misinterpreted. For number-only strings, quotation marks should not be used.