From owner-freebsd-chat@FreeBSD.ORG Mon Mar 31 23:29:00 2008 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C1821065670 for ; Mon, 31 Mar 2008 23:29:00 +0000 (UTC) (envelope-from raven@apriliaforum.net) Received: from smtprelay11.ispgateway.de (smtprelay11.ispgateway.de [80.67.29.28]) by mx1.freebsd.org (Postfix) with ESMTP id E8E3B8FC18 for ; Mon, 31 Mar 2008 23:28:59 +0000 (UTC) (envelope-from raven@apriliaforum.net) Received: from [91.18.97.56] (helo=Toy.Firlefanz.org) by smtprelay11.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JgTFk-00035G-6C for freebsd-chat@freebsd.org; Tue, 01 Apr 2008 01:17:24 +0200 Message-ID: <47F170FF.9060000@apriliaforum.net> Date: Tue, 01 Apr 2008 01:17:19 +0200 From: Raven User-Agent: Thunderbird 2.0.0.12 (X11/20080316) MIME-Version: 1.0 To: freebsd-chat@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Df-Sender: 501592 Subject: Gamepads X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2008 23:29:00 -0000 This is old news, but I searched like mad, and couldn't find anything on the web. Maybe some of you once have the same problem. I wanted to play a game under Wine, but it was nearly unplayable with the keyb controls. So I plugged in an USB gamepad . . . it didn't work. Time to hit the wonderful world of Google . . . As always, the combination of Wine + "Insert_topic_here" yielded nothing but "Linux - mainly Ubuntu" stuff. There are enough threads, but none that helps. Seems like Linux has /dev/input/js, I wonder if this is neccessary . . . The Wine wiki mentions a DirectInput registry key . . . Linux only. We have USB keyboards and mice, we should have a gamepad, me thinks . . . Lemme see, $ cat /dev/uhid1 . . nothing $ cat /dev/uhid2 . . there it is ! Me presses buttons, jerks sticks - terminal responds with weird output. Good ! Uh-huh, what about the joystick driver in ../xorg/modules/input ? $ man joystick There - everything is documented in all it's glory. $ sudo vi /etc/X11/xorg.conf :snip Section "ServerLayout" .. InputDevice "Gamepad" .. .. Section "InputDevice" Identifier "Gamepad" Driver "joystick" Option "Device" "/dev/uhid2" Option "Buttons" "16" Option "many_more" EndSection :snap Guess what - it worked. Tons of useless threads in hundreds of Linux forums, and all you need is a single manpage. Go figure . .