You are not logged in.

#1 2011-10-27 04:00:03

Slyder
Member
Registered: 2010-10-21
Posts: 12

How do I disable a Gamepad in Xfce? [SOLVED]

So I just installed Arch and Xfce on my new netbook, I've got everything configured and working perfectly for the most part except for this one problem; when I plug my gamepad in (for playing old games on zsnes or virtual boy advance) Xfce picks it up as a mouse.  This isn't a problem until I accidentally touch one of the analog control sticks on it... that causes my mouse cursor to go haywire and I have to unplug the gamepad to get it to stop.  Is there a way that I can disable this particular input/mouse in Xfce but still have it usable for my other programs?

EDIT: Also, for the record, I don't want to completely disable auto-detection of all mice/input devices in Xfce because I'd still like to be able to use a random mouse with this netbook when I have one available, I just want to keep this specific device from being used by Xfce and Xfce alone so that I can still play my games but without having my mouse cursor go nuts on me.

Last edited by Slyder (2011-10-27 06:34:06)

Offline

#2 2011-10-27 05:59:04

elliott
Member
Registered: 2006-03-07
Posts: 296

Re: How do I disable a Gamepad in Xfce? [SOLVED]

Do you have xf86-input-joystick installed? That isn't required for normal use of the gamepad, it is only needed to use the gamepad as a mouse. Removing that package shouldn't break any games.

Last edited by elliott (2011-10-27 05:59:52)

Offline

#3 2011-10-27 06:17:03

ConnorBehan
Package Maintainer (PM)
From: Long Island NY
Registered: 2007-07-05
Posts: 1,359
Website

Re: How do I disable a Gamepad in Xfce? [SOLVED]

I agree with elliott. If your gamepad still functions as a mouse without xf86-input-joystick installed, the fix is probably to stop it from sending core events.

To do this, create an "InputDevice" section in xorg.conf or xorg.conf.d/whatever and tie it to your gamepad by including the line:

Option "Device" "/dev/input/event#"

Then instead of applying default options when xorg hotplugs your gamepad it will obey the options in that section. So another line you should put in the section is either

Option "AlwaysCore" "false"

or

Option "SendCoreEvents" "false"

This way your gamepad will still register with Xorg but it won't be able to move the cursor. This is better than "disabling it" as I'm pretty sure that would make Xorg (and by extension the games running on top of it) unaware of the device.

The caveat of course is that you need to know a reliable path to the gamepad device. Above I have written "/dev/input/event#" as the path where "event#" has an unknown number. It is pretty easy to find out the event number that should go with the gamepad by reading the file "/proc/bus/input/devices" but since you use hotplugging, the event number on a day where the gamepad is the first mouse you've plugged in on that day, might be different from the event number on a day where the gamepad is the fourth mouse you've plugged in on that day. Being able to guarantee a path for it might require a udev rule or something.

Last edited by ConnorBehan (2011-10-27 06:17:48)


6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.

Offline

#4 2011-10-27 06:21:06

Slyder
Member
Registered: 2010-10-21
Posts: 12

Re: How do I disable a Gamepad in Xfce? [SOLVED]

elliott wrote:

Do you have xf86-input-joystick installed? That isn't required for normal use of the gamepad, it is only needed to use the gamepad as a mouse. Removing that package shouldn't break any games.

That fixed the problem, thank you!

Offline

#5 2011-10-27 06:27:53

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: How do I disable a Gamepad in Xfce? [SOLVED]

Slyder, please mark this thread as [SOLVED] by editing the title of your first post.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB