Question on using a Joystick as a mouse in Fedora please?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a question on using a Joystick as a mouse in Fedora.  

I wish to avoid getting carpal tunnel syndrome.
I noticed, when I use regular mice, I have poor hand position.
So far, my wrist is okay...but it gets red if I'm not careful.

I was thinking, it might be better for me,
if I could use a joystick as a mouse.

I have an old joystick, made by InterAct, laying around.

Fedora recognizes my joystick.
rsewill@rsewill:~ <2:2> $ lsusb
...
Bus 001 Device 007: ID 05fd:3300 InterAct, Inc. 
...
rsewill@rsewill:~ <2:3> $ 

I can find the devices, for my joystick, in /dev/input/by-id:
rsewill@rsewill:~ <2:10> $ ls -l /dev/input/by-id/
total 0
lrwxrwxrwx. 1 root root 9 2009-09-13 23:46
usb-S.T.D._Interact_Gaming_Device-event-joystick -> ../event5
lrwxrwxrwx. 1 root root 6 2009-09-13 23:46
usb-S.T.D._Interact_Gaming_Device-joystick -> ../js0
rsewill@rsewill:~ <2:11> $

I installed joystick-1.2.15-23.fc11.x86_64 to test my joystick.
Within this package is the program, jstest.
jstest seems to work with the link pointing to ../js0
rsewill@rsewill:~ <2:15> $
jstest /dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-joystick 
Joystick (S.T.D. Interact Gaming Device) has 6 axes and 7 buttons.
Driver version is 2.1.0.
...
The x-axis, y-axis, z-axis, and all buttons are detected.
I believe jstest reports the correct states for the axes and buttons.

jstest with the symbolic link pointing to ../event5 fails with an error.
rsewill@rsewill:~ <2:16> $
jstest /dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-event-joystick 
Joystick (Unknown) has 2 axes and 2 buttons. Driver version is 0.8.0.
Testing ... (interrupt to exit)

jstest: error reading: Invalid argument
rsewill@rsewill:~ <2:17> $ 

I tried adding the following lines to my /etc/X11/xorg.conf file,
[root@rsewill X11]# diff -Naur xorg.conf.old xorg.conf
--- xorg.conf.old       2009-09-09 20:22:16.000000000 -0500
+++ xorg.conf   2009-09-14 09:12:29.000000000 -0500
@@ -4,6 +4,7 @@
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
+       InputDevice    "Joystick0" "SendCoreEvents"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

@@ -23,6 +24,13 @@
        Option      "Emulate3Buttons" "yes"
EndSection

+Section "InputDevice"
+       Identifier  "Joystick0"
+       Driver      "evdev"
+       Option      "Device"
"/dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-joystick"
+       Option      "ButtonMapping" "4 2 3"
+EndSection
+
Section "Monitor"
        Identifier   "Monitor0"
        HorizSync    28.0 - 110.0
[root@rsewill X11]# 

I get the following error in /var/log/Xorg.0.log:
(**) Option "SendCoreEvents"
(**) Joystick0: always reports core events
(**) Joystick0: Device:
"/dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-joystick"
(**) Joystick0: ButtonMapping '4 2 3'
(EE) ioctl EVIOCGNAME failed: Invalid argument
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for "Joystick0"

Alternatively, I tried using the "event5" device,
[root@rsewill X11]# diff -Naur xorg.conf.old xorg.conf
--- xorg.conf.old       2009-09-09 20:22:16.000000000 -0500
+++ xorg.conf   2009-09-14 09:18:49.000000000 -0500
@@ -4,6 +4,7 @@
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
+       InputDevice    "Joystick0" "SendCoreEvents"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

@@ -23,6 +24,13 @@
        Option      "Emulate3Buttons" "yes"
EndSection

+Section "InputDevice"
+       Identifier  "Joystick0"
+       Driver      "evdev"
+       Option      "Device"
"/dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-event-joystick"
+       Option      "ButtonMapping" "4 2 3"
+EndSection
+
Section "Monitor"
        Identifier   "Monitor0"
        HorizSync    28.0 - 110.0
[root@rsewill X11]# 

When I restart X, I get the following error:
(**) Option "SendCoreEvents"
(**) Joystick0: always reports core events
(**) Joystick0: Device:
"/dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-event-joystick"
(**) Joystick0: ButtonMapping '4 2 3'
(II) Joystick0: Found x and y absolute axes
(WW) Joystick0: Don't know how to use device
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for "Joystick0"

Searching the Internet, I believe I should use the evdev driver.

Any idea which device I should use in /dev/input/by-id ?
I suspect, but am not certain, I should use
/dev/input/by-id/usb-S.T.D._Interact_Gaming_Device-event-joystick

Any idea how to get around the "Don't know how to use device" error?
I suspect, if I knew how to map x and y absolute axes to relative axes,
I might make progress on getting this to work.

On a side note, I have a dual-boot system.  
I tried booting Windows and installed a third party app
to use my joystick as a mouse.  I was partially successful.
I could move the mouse using my joystick, but I didn't like the result.
The mouse movement wasn't crisp.  The mouse movement started slow.
It was hard to stop the mouse where I wanted the mouse to stop.
I didn't both trying to adjust the third party app preferences.
I uninstalled the third party app after this test.
I only did this test to see if the joystick hardware was working.

Is there a Linux GUI program, perhaps a game, I can use,
to test my joystick to build confidence the hardware and software work?

Thanks, in advance, for any suggestions.

-Rick

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux