Skip to content

Instantly share code, notes, and snippets.

@glebm
Last active December 5, 2023 10:55
Show Gist options
  • Save glebm/777c8542ba512e755d13bc2017f7316e to your computer and use it in GitHub Desktop.
Save glebm/777c8542ba512e755d13bc2017f7316e to your computer and use it in GitHub Desktop.
gamepad configuration for xash3d-fwgs
// Default gamepad bindings
// == Bindings ==
// https://raw.githubusercontent.com/krishenriksen/Half-Life-rg351p/da77c22b60c29589240b86608495574672105206/Half-Life/controls.png
//
// Left stick: Move/Strafe (Walk instead of run when pressed)
// Right stick: Look (Crouch when pressed)
// D-Pad Up: Spray
// D-Pad Down: Quick swap weapon
// D-Pad Left: Prev Weapon
// D-Pad Right: Next Weapon
// A: Use
// B: Jump
// X: Flashlight
// Y: Reload
// L1: Duck
// L2: Walk (instead of Run)
// R1: Fire
// R2: Alt-fire
// START: Pause
// SELECT + X: Menu
// SELECT + R1: Quick Save
// SELECT + L1: Quick Load
// SELECT + START: Quit
bind DPAD_UP "impulse 201"
bind DPAD_DOWN "lastinv"
bind DPAD_LEFT "invprev"
bind DPAD_RIGHT "invnext"
// NOTE: A, B, X, Y refer to physical positions on an XBox 360 controller.
// A<->B and X<->Y are reversed on a Nintendo controller.
bind A_BUTTON "+jump"
bind B_BUTTON "+use"
bind X_BUTTON "+reload"
bind Y_BUTTON "impulse 100"
bind L1_BUTTON "+duck"
bind LTRIGGER "+speed"
bind R1_BUTTON "+attack"
bind RTRIGGER "+attack2"
bind START "pause"
bind STICK1 "+speed"
bind STICK2 "+duck"
// While SELECT is pressed:
alias "+SelectHold" "bind L1_BUTTON load quick; bind R1_BUTTON save quick; bind B_BUTTON screenshot; bind X_BUTTON cancelselect; bind START quit"
// When SELECT is released, restore the original bindings (duplicated above).
alias "-SelectHold" "bind L1_BUTTON +duck; bind R1_BUTTON +attack; bind B_BUTTON +jump; bind X_BUTTON impulse 100; bind START pause"
bind BACK "+SelectHold"
exec gamepad.cfg
exec custom.cfg
@PDEllis84
Copy link

Do I just drop this in the valve folder or rename it config.cfg?

@lewa-j
Copy link

lewa-j commented Apr 6, 2022

Do I just drop this in the valve folder or rename it config.cfg?

@PDEllis84 just drop these two files. Second one is important

@lewa-j
Copy link

lewa-j commented Apr 6, 2022

@PDEllis84
Copy link

i have done so i am using a duel shock 4 via blue tooth on device but its super sensitive and auto moves I have no idea what i am doing to get it working

@PDEllis84
Copy link

it appears my left stick thinks its moves by itself if i lower the sensitivity i can use the right stick to move the camera

@PDEllis84
Copy link

@lewa-j thanks for your help i manage to identify the move is down to dead zones on left stick but i cant seen the find the point were it can work would u have any idea on this thanks

@KatSuYeah
Copy link

dropping both into valve makes it think im holding down A which makes it jump moment you start and not letting you jump any more during the level, im using a Razer Kishi Xbox edition.

@OBSAM4
Copy link

OBSAM4 commented Apr 3, 2023

a few issues i have with this

  • for some reason after using this my gun is on my left side,
    im not sure if this was my fault or the codes but regardless
    its flipped.

  • the shoot button is binded to the R1 input, who tf uses that
    input to shoot??

  • game says "DPAD is invalid / does not exist"

  • have to touch the screen to use the buy menu

@OBSAM4
Copy link

OBSAM4 commented Apr 3, 2023

new issue, now i cant reload at all

@Kveiro1
Copy link

Kveiro1 commented Aug 20, 2023

@lewa-j thanks for your help i manage to identify the move is down to dead zones on left stick but i cant seen the find the point were it can work would u have any idea on this thanks

Have you fix this? I'm having the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment