Bind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (shorter.)
mNo edit summary
Line 1: Line 1:
This is a [[console command]] that lets you bind other console commands to a key.
This is a [[console command]] that lets you bind other console commands to a key.
----
----
{{syntax|bind "key" "c1;c2;..."}}
{{syntax|bind key "c1;c2;..."}}


{{ccexample|If you wanted to make the '''H''' key make you say ''"Hello."'' in chat, you would type in console: |bind "h" "say Hello."}}
{{ccexample|If you wanted to make the '''H''' key make you say ''"Hello."'' in chat, you would type in console: |bind h "say Hello."}}


{{ccexample|If you wanted to make the '''L''' key prepare you screen for [[How To Take Screenshots|screenshots]], you would type in console: |bind "l" "cl_drawhud 0;crosshair 0;impulse 200"}}
{{ccexample|If you wanted to make the '''L''' key prepare you screen for [[How To Take Screenshots|screenshots]], you would type in console: |bind l "cl_drawhud 0;crosshair 0;impulse 200"}}


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.
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.

Revision as of 20:48, 19 May 2007

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


Syntax: bind key "c1;c2;..."

Template:Ccexample

Template:Ccexample

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.


For other useful information on console variables, please head back to the Console Commands Listing