Page 42 of 42 FirstFirst ... 3233343536373839404142
Results 411 to 415 of 415

Thread: Space Navigator PE Driver Development Thread

  1. #411
    Newbie JustinNoel's Avatar
    Join Date
    Jan 2011
    Location
    Boston, MA, USA
    Posts
    14
    Also, I'm not using the evdev driver as I don't want a mouse. I want a 8-way controller. Left/Right/Up/Down/Push/Pull/TwistL/TwistR as discrete events. Those "gestures" would be passed to the app as key events. The key event abstraction nice since I can test with the keyboard and could switch up the hardware. I really ought tot be using a 4way directional and a knob with push and pull. The Space Pilot looked like an interesting thing I could bastardize into an all in one controller like the new iDrive controller. That and I find creatively making stuff like this work to be fun.
    Justin Noel
    Senior Software Engineer
    ICS
    http://www.ics.com

  2. #412
    Maximum Bitrate nasa's Avatar
    Join Date
    Aug 2006
    Location
    PA
    Posts
    721
    Did you happen to look at the 1st post on the link I posted earlier? While the guy who posted that was having some issues, I think it might be a starting point.

    BTW: I only mentioned the evdev driver as a jump off point to using the joystick driver. Also, I would configure a joystick.conf file and place it into the /etc/X11/xorg.conf.d/ directory.

  3. #413
    Newbie JustinNoel's Avatar
    Join Date
    Jan 2011
    Location
    Boston, MA, USA
    Posts
    14
    I'm actually fiddling with /dev/js0 now to see what I can get out of it. There seems quite a bit of google traffic about mapping joystick to key strokes; Looks like a promising direction. Thanks for the tip. Do you have a SpaceNav device? Have you gotten the joystick interface to work at all? It may be that my device isn't working correctly or spacenavd is blocking access. I'll let you know how this pans out. Thanks again!
    Justin Noel
    Senior Software Engineer
    ICS
    http://www.ics.com

  4. #414
    Newbie JustinNoel's Avatar
    Join Date
    Jan 2011
    Location
    Boston, MA, USA
    Posts
    14
    Figures. The evdev joystick driver already does what I want. Here is what I added to xorg.conf (verboseness is for other who may come across this).

    With this config I can give the knob a firm push/release in the general direction I want and get one event. Hold and it auto-repeats, albeit for now a slower than the keyboard. I think there may be a setting for that somewhere. The docs are a little unclear as to what the parameters to axis= really are, but this got me decent repeat without dups when simply pushing the knob naturally. I also could not get the mode=accelerated to provide keystrokes at all. So I'm not sur eif that could have gotten be better repeat speed. The scan codes used are from /usr/share/X11/xkb/keycodes/evdev

    Code:
    Section "InputDevice"
        Identifier "SpaceBall"
        Driver "joystick"
        Option "Device"   "/dev/input/js0"
        Option "Path"   "/dev/input/js0"
        Option "StartMouseEnabled" "False"
        #Left/Right
        Option "MapAxis1" "mode=relative axis=5x deadzone=390 keylow=113 keyhigh=114"
        #Up/Down
        Option "MapAxis2" "mode=relative axis=5x deadzone=390 keylow=111 keyhigh=116" 
        #Enter/Escape
        Option "MapAxis3" "mode=relative axis=5x deadzone=390 keylow=9   keyhigh=36"
        #Up/Down
        Option "MapAxis4" "mode=relative axis=5x deadzone=250 keylow=111 keyhigh=116"
        #Right/Left
        Option "MapAxis5" "mode=relative axis=5x deadzone=250 keylow=114 keyhigh=113"
        #Rewind/Forward
        Option "MapAxis6" "mode=relative axis=5x deadzone=350 keylow=176 keyhigh=167"
    EndSection
    Then I added the SpaceBall as a Core Input Device in the ServerLayout:
    Code:
    Section "ServerLayout"
        Identifier "layout1"
        InputDevice "Keyboard0" "CoreKeyboard"
        InputDevice "touchscreen"
        InputDevice "SpaceBall" "SendCoreEvents"
        Screen 0  "Screen0" 0 0
        Option "Xinerama" "0"
    EndSection
    Justin Noel
    Senior Software Engineer
    ICS
    http://www.ics.com

  5. #415
    Maximum Bitrate nasa's Avatar
    Join Date
    Aug 2006
    Location
    PA
    Posts
    721
    If I can make a couple of slight changes...

    Instead of /dev/input/js0 use /dev/input/spacenavigator and add the following udev rule:

    KERNEL=="event[0-9]*", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c626", MODE="0664", SYMLINK+="input/spacenavigator"

    This way the above will work for someone with multiple usb joysticks and they won't have to worry about attaching to the right device...

Similar Threads

  1. Questions!
    By Yellow-Snow in forum Mobile Impact
    Replies: 4
    Last Post: 06-10-2006, 05:18 PM
  2. iGuidance Font Size Fix summary thread
    By Viscouse in forum GPS
    Replies: 29
    Last Post: 03-28-2006, 06:21 PM
  3. Hot Chicks Thread - NOT WORK SAFE
    By ODYSSEY in forum Off Topic
    Replies: 1
    Last Post: 05-17-2005, 09:38 PM
  4. Replies: 3
    Last Post: 01-07-2004, 11:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •