Steam Support Wiki
 
 

Guide: Configuring a Joystick or Gamepad for Source:da

 
 

The content of this page is moderated by both Steam Support and the Steam user community - any links to outside sites should be treated with caution.

Steam Support will not request your Steam account password for any reason, nor will you ever be asked to enter your Steam account password into a website form.

Interested in assisting with translation? Apply to become a Steam Support Wiki Translator
English content to translate (START)

To properly configuring your joystick you must:

  1. Define how Source should interpret the various axes available from your joystick (adding a joystick.cfg).
  2. Assign individual controls within your game (editing the config.cfg).


Most joysticks and gamepads come with a joystick.cfg you can use with source games out of the package. If your controller did not, you can create one with just the information found here.

The joystick.cfg file is saved in different places for different games. Here is a list of the locations to save the file for most Source games:

  • Counter-Strike: Source
    ..\Steam\steamapps\[USER NAME]\counter-strike source\cstrike\cfg</li>
  • Day of Defeat: Source
    ..\Steam\steamapps\[USER NAME]\day of defeat source\dod\cfg</li>
  • Half-Life: Source
    ..\Steam\steamapps\[USER NAME]\half-life source\hl1\cfg</li>
  • Half-Life 2
    ..\Steam\steamapps\[USER NAME]\half-life 2\hl2\cfg</li>
  • Half-Life 2 Deathmatch
    ..\Steam\steamapps\[USER NAME]\half-life 2 deathmatch\hl2mp\cfg</li>
  • Half-Life 2: Episode One
    ..\Steam\steamapps\[USER NAME]\half-life 2 episode one\episodic\cfg</li>
  • Half-Life 2: Episode Two
    ..\Steam\steamapps\[USER NAME]\half-life 2 episode two\ep2\cfg</li>
  • Half-Life 2: Lost Coast
    ..\Steam\steamapps\[USER NAME]\half-life 2 lostcoast\lostcoast\cfg</li>
  • Half-Life Deathmatch: Source
    ..\Steam\steamapps\[USER NAME]\half-life deathmatch source\hl1mp\cfg</li>
  • Left 4 Dead
    ..\Steam\steamapps\[USER NAME]\left4dead\terror\cfg</li>
  • Portal
    ..\Steam\steamapps\[USER NAME]\portal\portal\cfg</li>
  • Team Fortress 2
    ..\Steam\steamapps\[USER NAME]\team fortress source\tf\cfg</li>

The joystick.cfg is built in this manner:

joy_name “Joystick Name”
joy_advanced 1
your mapping commands
your sensitivity commands
your threshold commands
joyadvancedupdate


Activating your Joystick

The configurations you made in your joystick.cfg will determine what the analog controls are used for in your Source game. Other controls can be assigned in a different manner.

  1. Go to Options-->Mouse and check the Joystick and Joystick Look checkboxes.</li>
  2. Click on the Keyboard tab.</li>
  3. For each action you wish to assign to a button, double click on the control and press the button you wish to activate it. You will see the control's name appear in the KEY/BUTTON section. This will allow you to quickly make assignments to your controller. The assignments are saved in your config.cfg. Alternatively, you can edit the config.cfg directly using this syntax:

bind "button" "action"
For example:
bind “JOY1” “+jump”
This would bind button number 1 on your joystick to jump.</li>

In addition to assigning joystick axes to specific directional controls, you may also specify how these actions respond using sensitivity and threshold controls.


Joystick Console Variables

joy_accelscale*
Default: 0.6
joy_advanced
Required in joystick.cfg before setting mapping, sensitivity, and threshold commands. Default 0
joy_advaxisr
Axis R: typically, this axis is a joystick rudder (rotation) control.
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
(Xbox 360 Controller: right analog stick Y-axis)
joy_advaxisu
Axis U: typically
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
(Xbox 360 Controller: right analog stick X-axis)
joy_advaxisv
Axis V:
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
joy_advaxisx
Axis X: typically this is the primary X-axis of the controller.
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
(Xbox 360 Controller: left analog stick X-axis)
joy_advaxisy
Axis Y: typically this is the primary Y-axis of the controller.
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
(Xbox 360 Controller: left analog stick Y-axis)
joy_advaxisz
Axis Z: typically this is the primary Z-axis or throttle of the controller.
0 = Axis not used
1 = Axis used for movement forward and back (forward)
2 = Axis used for looking up and down(pitch)
3 = Axis used for strafing(side)
4 = Axis used for turning(yaw)
(Xbox 360 Controller: left (negative) and right (positive) trigger buttons)
joy_autoaimdampen*
Specifies how much to scale user stick input when the gun is pointed at a valid target
Default “0”
joy_autoaimdampenrange*
The stick range where autoaimdampen is applied
Default “0”
joy_autosprint*
Automatically sprint when moving with an analog joystick
Default “0”
joy_axisbutton_threshold*
Analog axis range before a button press is registered. For example, when using the analog trigger on the Xbox 360 Controller to fire a weapon, the default setting requires that you pull the trigger 30% of the full trigger range before the weapon will fire.
Default: “0.3”
joy_diagonalpov
POV manipulator operates on diagonal axes, too
Default: “0”
joy_display_input*
Write joystick control information to the console log.
Default: “0”
joy_forwardsensitivity
Specifies the amount of joystick movement required for maximum movement speed forward and back.
Default: -1
joy_forwardthreshold
Specifies the dead-zone for movement forward and back.
Default: “0.15”
joy_lowend*
Specifies the amount of the controller’s physical range you wish to section off as the “inner zone”.
Default: 1
joy_lowmap*
Specifies the amount of the controller’s true range is mapped to the “inner zone”.
Default: 1
joy_name
Value: Text
Name your joystick. Example: joy_name “Xbox 360 Controller”
joy_pitchsensitivity
Specifies the speed or ratio used when looking up and down.
Default: 1
joy_pitchthreshold
Specifies the dead-zone for looking up and down.
Default: “0.15”
joy_response_look*
Look stick response mode:
0=Linear
1=quadratic
2=cubic
3=quadratic extreme
4=custom
joy_response_move*
Movement' stick response mode:
0=Linear
1=quadratic
2=cubic
3=quadratic extreme
4=power function (i.e., pow(x,1/sensitivity))
joy_sidesensitivity
Specifies the amount of joystick movement required for maximum movement speed side to side.
Default: 1
joy_sidethreshold
Specifies the dead-zone for movement side to side.
Default: “0.15”
joy_wingmanwarrior_centerhack
Fixes a centering problem with the Wingman Warrior joystick.
Default: 0
joy_wingmanwarrior_turnhack
Fixes a spin problem with the Wingman Warrior joystick.
Default: 0
joy_yawsensitivity
Specifies the speed or ratio used when looking left or right.
Default: 1
joy_yawthreshold
Specifies the dead-zone for looking left or right.
Default: 0.15
Joyadvancedupdate
Updates current joystick settings.
Takes no value.
joystick
Value: 0,1
Disable/Enable joystick

* Not available for all Source games.

</div>
(END) English content to translate
Interested in assisting with translation? Apply to become a Steam Support Wiki Translator


 
  Search  
 

 
  Views  
   
  In other languages  
   
 
  link: Valve Software MediaWiki Logo