How can I stop a joystick from controlling my mouse?
How can I stop a joystick from controlling my mouse in Ubuntu 12.04?
I tried to remove xserver-xorg-input-joystick and /usr/lib/X11/xorg.conf.d/10-joystick, both not installed.
4 Answers
1- You should see your joystick number first ... so Run Terminal and type xinpute list ,and look to your joystick number and replace its number instead of the 10 in the Example below.
#!/bin/bash
id=xinput list | grep "↳ DragonRise Inc. Generic USB Joystick id=10" | cut -c58-59props_mouse=xinput list-props 10 | grep "Generate Mouse Events (" | cut -c25-27props_teclado=xinput list-props 10 | grep "Generate Key Events (" | cut -c23-25xinput set-prop 10 $props_mouse 0
xinput set-prop 10 $props_teclado 0
2- Creat a new Document then put the code in it , then rename it to name.sh Format 3- Run Terminal then put the path where you save the file .
Example : cd Desktop (Because i saved mine on the Desktop)
4- Type bash name.sh ( Click Enter and You are Done ! )
Note1: to Turn it back on just change the 0 on the last 2 lines to 1 Note2: if this doesn't work make sure to remove xserver-xorg-input-joystick and /usr/lib/X11/xorg.conf.d/10-joystick
Taking from AhmedAlkaabi:
xinput may have more features now??
#!/bin/bash
id=$(xinput --list --id-only 'ZEROPLUS P4 Wired Gamepad')
source <(xinput list-props $id | perl -ne' if(m/Generate Mouse Events \(([0-9]+)\)/){print"props_mouse=$1;";} if(m/Generate Key Events \(([0-9]+)\)/){print"props_teclado=$1;";}
')
xinput set-prop $id $props_mouse 0
xinput set-prop $id $props_teclado 0This is BASH, won't work is lesser shells. Uses a bit of perl, but should not be too bad for anyone.
In /etc/X11/xorg.conf.d/, you can create a file that contains
Section "InputClass" Identifier "joystick catchall" MatchIsJoystick "on" MatchDevicePath "/dev/input/event*" Driver "joystick" Option "StartKeysEnabled" "False" # Disable mouse events Option "StartMouseEnabled" "False" # Disable keyboard events
EndSection(Taken from → here).
For me, the issue turned out to be Steam!
By default, Steam makes your gamepad control the mouse cursor, which is super annoying if you're trying to play browser-based gamepad games, since Steam thinks that's the "desktop" config.
To disable that, go into Steam Settings, then "Controller", then click on "Desktop Configuration".
Next, click on "Browse Configs" and choose "Disabled".
Finally, click on "Apply Configuration" and then "Done".
Voila.
0More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"