Customizing Options: Keyboard: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Less known fact about the keyboard layout)
 
Line 1: Line 1:
==Overview==
==Setting Up Your MOD's Defaults==


By default, Source Engine will generate ''config.cfg'' from the default keyboard layout found in '''/cfg/config_default.cfg''', not '''/scripts/kb_def.lst'''.
The default keyboard layout that appears in the keyboard options tab is generated by the commands containing bind in '''config_default.cfg'''. This means '''kb_def.lst''' is NOT of any use to have.


To edit the default keyboard layout, rename ''config.cfg'' to ''config_default.cfg'' and change to your liking.
 
 
The '''config_default.cfg''' doesn't have all of the archived cvars that config.cfg does. '''config_default.cfg''' should instead come from the '''source engine.gcf'''.  The '''config_default.cfg''' from '''source engine.gcf''' looks like this:
// YWB 10/10/03: 
// If the user doesn't have a config.cfg when they run, this gets executed the first time they run the engine
// It doesn't execute if they have their own config.cfg saved out.
unbindall
bind "ESCAPE" "cancelselect"
bind "`" "toggleconsole"
bind "w" "+forward"
bind "s" "+back"
bind "a" "+moveleft"
bind "d" "+moveright"
bind "SPACE" "+jump"
bind "CTRL" "+duck"
bind "e" "+use"
bind "c" "impulse 50"
bind "r" "+reload"
bind "ALT" "+walk"
bind "SHIFT" "+speed"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind "f" "impulse 100"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "MWHEELUP" "invprev"
bind "MWHEELDOWN" "invnext"
bind "q" "lastinv"
bind "F5" "jpeg"
bind "F6" "save quick"
bind "F9" "load quick"
bind "PAUSE" "pause"
bind "z" "+zoom"
bind "g" "phys_swap"

Revision as of 15:40, 6 July 2005

Setting Up Your MOD's Defaults

The default keyboard layout that appears in the keyboard options tab is generated by the commands containing bind in config_default.cfg. This means kb_def.lst is NOT of any use to have.


The config_default.cfg doesn't have all of the archived cvars that config.cfg does. config_default.cfg should instead come from the source engine.gcf. The config_default.cfg from source engine.gcf looks like this:

// YWB 10/10/03:  
// If the user doesn't have a config.cfg when they run, this gets executed the first time they run the engine
// It doesn't execute if they have their own config.cfg saved out.
unbindall

bind "ESCAPE" 		"cancelselect"
bind "`" 		"toggleconsole"
bind "w"		"+forward"
bind "s"		"+back"
bind "a"		"+moveleft"
bind "d"		"+moveright"
bind "SPACE"		"+jump"
bind "CTRL"		"+duck"
bind "e"		"+use"
bind "c"		"impulse 50"
bind "r"		"+reload"
bind "ALT"		"+walk"
bind "SHIFT"		"+speed"
bind "MOUSE1"		"+attack"
bind "MOUSE2"		"+attack2"
bind "f"		"impulse 100"
bind "1"		"slot1"
bind "2"		"slot2"
bind "3"		"slot3"
bind "4"		"slot4"
bind "5"		"slot5"
bind "6"		"slot6"
bind "7"		"slot7"
bind "MWHEELUP"		"invprev"
bind "MWHEELDOWN"	"invnext"
bind "q"		"lastinv"
bind "F5"		"jpeg"
bind "F6"		"save quick"
bind "F9"		"load quick"
bind "PAUSE" 		"pause"
bind "z"		"+zoom"
bind "g"		"phys_swap"