2

The file /dev/input/js0 related to joysticks is giving me some problems in games.

I just renamed the file and everything went to normal.
So, how do I disable joystick input? I am using Ubuntu 12.04.

1
  • 1
    Ok, my microsoft keyboard is recognized as a joystick!!!!? How can I fix this?
    – faceless
    Aug 8, 2012 at 13:02

2 Answers 2

1

If your actual issue is that your Microsoft keyboard gets recognized as a joystick, you are not alone, it affects several people.

My solution for that is to download this file and save it as /etc/udev/rules.d/51-these-are-not-joysticks.rules. You can run this command on a terminal:

sudo curl -o /etc/udev/rules.d/51-these-are-not-joysticks.rules \ 
  https://gist.githubusercontent.com/denilsonsa/978f1d842cf5430f57f6/raw

Link to my GitHub Gist containing the file: https://gist.github.com/denilsonsa/978f1d842cf5430f57f6


[years later]

After many contributions, that little file grew and moved from that GitHub Gist to a full GitHub repository: https://github.com/denilsonsa/udev-joystick-blacklist, and many distros started incorporating that workaround.

0

You should see your joystick number first... so open a terminal and run xinput 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-59
props_mouse=xinput list-props 10 | grep "Generate Mouse Events (" | cut -c25-27
props_teclado=xinput list-props 10 | grep "Generate Key Events (" | cut -c23-25
xinput set-prop 10 $props_mouse 0
xinput set-prop 10 $props_teclado 0

Save the above into a file like ~/disable_joystick.sh and then run chmod +x ~/disable_joystick.sh.

You can now run ~/disable_joystick.sh and it should block your device from generating mouse and keyboard events in X.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .