Bind: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Robot: fixing template case.)
Line 3: Line 3:
{{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 19:17, 19 January 2009

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


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


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


Example: If you wanted to make the L key prepare you screen for 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.

Special Keys

  • tab
  • enter
  • escape
  • space
  • backspace
  • uparrow
  • downarrow
  • leftarrow
  • rightarrow
  • alt
  • ctrl
  • shift
  • ins
  • del
  • pgdn
  • pgup
  • home
  • end
  • kp_home
  • kp_uparrow
  • kp_pgup
  • kp_leftarrow
  • kp_5
  • kp_rightarrow
  • kp_end
  • kp_downarrow
  • kp_pgdn
  • kp_enter
  • kp_ins
  • kp_del
  • kp_slash
  • kp_minus
  • kp_plus
  • capslock
  • joy1-4
  • aux1-31
  • mwheeldown
  • mwheelup
  • mouse1-5
  • pause

See Also

Console Command List