Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The file /dev/input/js0 is missing from my directories. I am attempting to use the joy2key plugin from the Software Center to map keystrokes to my gamepad but when I attempted to start I got the following response in the terminal:

$ joy2key -dev /dev/input/js0 -terminal
joy2key - reads joystick status and dispatches keyboard events
By Peter Amstutz (tetron@interreality.org)
This is free software under the GNU General Public License (GPL v2)
          (see COPYING in the joy2key archive)
You are welcome to use/modify this code, and please e-mail me
if anything cool comes of it!
Version: 1.6.3   Binary built on Dec 22 2009 at 13:45:44

Error opening /dev/input/js0!
Are you sure you have joystick support in your kernel?
$

I double-checked this by navigating to /dev/input in the file manager and saw no file or folder "js0".

I am running Ubuntu 12.10

share|improve this question

1 Answer 1

/dev/input/js0 will get automatically created when you plug in your gamepad. If that does not happen, that can mean your gamepad isn't supported by the kernel, your gamepad is broken or some other kind of USB foobar is happening. The output of dmesg should provide further hints what is happening when you plug the pad in.

It is also possible that your pad is working fine, but that it doesn't get recognized as joystick and instead gets thrown into the generic event device category. Look if a /dev/input/eventX gets created when you plug in your pad.

For further testing you might also want to install:

apt-get install joystick evtest

evtest allows you to read from /dev/input/eventX

jstest allows you to read from /dev/input/js0

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.