HOW TO: Use your Xbox 360 Controller with Garry's Mod

So I’ve been playing around with my controller recently, and got it working with Garry’s Mod quite fluidly. I’d like to share my effort with all of you in this simple How-To guide. I even made some images for you.

http://i.min.us/idDeXK.png

First off, make sure your controller is plugged in and responding. You may need drivers from Microsoft if you haven’t done that already.

http://i.min.us/idDhfS.png

Second, install this handy-dandy .cfg file. Simply drag and drop into
C:\Program Files\Steam\steamapps\YOURNAME\garrysmod\garrysmod\cfg

Download:
http://www.mediafire.com/?w1bmiwd194ycc32

This configuration file binds all of the keys needed to use an Xbox controller ingame and makes the joysticks operable.

http://i.min.us/id8dOU.png

Third, install “JoyToKey”.
http://electracode.com/4/joy2key/JoyToKey%20English%20Version.htm
Download link is at the bottom of the page. It’s not really even in installation, program is already set to go.

http://i.min.us/id8M9C.png

Now, install this second cfg to the SAME DIRECTORY THAT JOYTOKEY IS IN.
http://www.mediafire.com/?4ecnanbk9ntd94v

Now, make sure that your controller is ON and run JoyToKey. You should see the “Gmod” configuration to the left. Select it. You should now be able to use your right control stick to move the mouse, R to click, and L to right click. This config also makes it so that START hits the “Escape” key (pause menu) and Dpad right and left operate the scrollwheel.

http://i.min.us/id8mv2.png

Lastly, run Garry’s Mod, open up the console, and type “exec xbox360controller”. It should autocomplete the sentence for you. Hit enter, and you should be good to go. Start up a singleplayer game and test it. Here’s the binding sheet:

**Right Trigger: Primary
Left Trigger: Secondary
Right Bumper: Next weapon
Left Bumper: Sprint
A: Jump
B: Reload
X: Activate
Y: (Nothing, you can bind it by editing the CFG in your garry’s mod folder and rerunning exec xbox…etc)
Back: Spawnmenu
Start: Escape Menu
Left Stick: Movement
Left Stick (Button): Crouch
Right Stick: Look around/Operate Spawnmenu
Right Stick (Button): Suit Zoom
D-Pad Up: Flashlight
D-Pad Down: Noclip
D-Pad Right & Left: Scrollwheel
**

KNOWN ISSUES/Other things:
-Crouch does not seem to work well in multiplayer (you can try editing the cfg and changing the command from “+duck” to “toggle_duck”)
-Want to use voice? Go into the CFG and where it says
bind “JOY4” “” // Y
change it to
bind “JOY4” “+voicerecord” // Y
-Can’t rotate props conventionally. Oversight on garry’s part.

I hope this tutorial was helpful, feel free to ask questions.

JoyToKey. :effort:

What did we need again to connect wireless controllers to pc?

OP neglected to mention this only works with wired controllers.

Or you could use a BlueTooth Adapter.

It works with either. I use a wireless controller.

Whats the point controllers suck.

Then don’t use them. This is a tutorial for those who would like to, for novelty or otherwise.

I done this but with Xpadder

It’s far simpler with Xpadder…not that it would be something I’d want to do, but you could cut out like 75% of the hassle that this method causes.

There really isn’t that much hassle with this method, I would say.

Uhm, how would we exactly, ragdoll pose?

and i thought gmod with a mac mouse would suck

Surely Glovepie would work better?

You pretty much don’t.

Ehmmet is right, it’s pretty difficult. Like I said, this is more of a novelty than anything, it’s not at all more functional than a mouse and keyboard.

You’re dumb.

No it’s a Wireless Gaming Receiver, not Bluetooth.

Wireless Gaming Receiver, although they discontinued them so you will need to look online for them.

How can I do this with a wireless one

Or, get the module/addon: http://www.facepunch.com/threads/403669-gmcl_joystick-DirectInput-module-with-simplified-interface

And use your XBox controller to control your contraptions! (Works great with helicopters and such)

Even works with having two XBox controller linked in wirelessly! :buddy:

What do we mean by “drivers from Microsoft”?

It’s a good vibrator