Xbox Controller Support

So I have plugged my Xbox 360 controller in via usb, and all is detected. Unfortunately the light just flashes on the controller and I am unable to use it to play any of my games.

I am wondering if anyone has successfully got the controller to work under FreeBSD.

Code:
ugen0.2: <Controller Microsoft Corporation> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

Now according to this source: FreeBSD added support for the wired xbox controllers awhile back, but I can't find much information regarding this.

Also, I am using FreeBSD 9.1-RC2 AMD64
 
Well, I have the controller working for emulators/snes9x, though, I really wanted to use the controller for Quake4. I had to install sysutils/uhidd and add the following to /etc/rc.conf

Code:
uhidd_flags="-kmohs"
uhidd_enable="YES"

I have done some researching to try and figure out how to get the controller to work for the Linux-quake4 and apparently I can set some keybindings in /etc/x11/xorg.conf

I haven't been able to find much detail on this, but I have the following for my joystick in xorg.conf.

Code:
Section "InputDevice"
    Identifier     "Joy0"
    Driver         "joystick"
    Option         "Path" "/dev/uhid0"
    Option         "Device" "/dev/uhid0"
EndSection

The I use the following command to see which keycodes I need:

[CMD=""]xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'[/CMD]

and it gives me the following:

Code:
36 Return
24 q
25 w
26 e
38 a
39 s
40 d

So I know I need to bind the directional keys to w,a,s,d for the movement in quake, but this is the bind I'm stuck at, any help is appreciated.
 
Back
Top