Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using xserver-xorg-input-joystick on Debian Stable so I can use a joystick in place of the mouse. I have mouse movement working correctly, but got stuck trying to add functions for some other keys.

These work:

#Left stick
#Pointer
Option "MapAxis1"   "mode=relative axis=1.5x"
Option "MapAxis2"   "mode=relative axis=1.5y"

#Right stick
#Arrow keys
Option "MapAxis4"   "mode=relative  keylow=Left keyhigh=Right"
Option "MapAxis5"   "mode=relative  keylow=Up   keyhigh=Down"

But when I try to make key combos (so I can navigate windows and screens in xmonad) I have no luck.

#dpad
#xmonad focus
#up/down toggle window.  l/r choose screen.
Option "MapAxis8" "mode=relative    keylow=Super_L,k    keyhigh=Super_L,j"
Option "MapAxis7" "mode=relative    keylow=Super_L,w    keyhigh=Super_L,e"

I've also tried Super_R, plain old Super, Meta, and mod4mask, and anything else I can think of. These buttons print the letter, but don't appear to hold down the modifying key. The exception to that is shift. If I specify Shift_L or Shift_R, I get a capital letter.

xev indicates that modifier keys are being pressed. If I lower Axis8, I get press Super_L, press k, release k, release Super_L. That looks like it should be working. Maybe this is an xmonad problem and not a joystick driver one?

I'm also having trouble with getting an axis to use other XF86 keys:

# triggers                                                                            
# song selection
Option "MapAxis3" "mode=relative keylow=none keyhigh=XF86AudioForward"
Option "MapAxis6" "mode=relative keylow=none keyhigh=XF86AudioBack"

That does nothing. Any idea why?

If it turns out that this isn't something I can do on an axis, but would work with a button, is there a way to treat my joysticks as buttons?

Also, if anyone has suggestions for the other 5 buttons I'll have left after mouse buttons are bound, I'm listening.

share|improve this question
    
I am trying to do the same thing as you. I can not get the stick to move the mouse.could you give the rest of your xorg.conf that pertains to this. JerryCLunsford – user77645 Apr 21 '11 at 7:43
    
@Jerry, I wouldn't mind sharing but mine stopped working entirely :-\ – valadil Apr 21 '11 at 13:27

I confess I don't know debian at all, but it sounds like you covered the bases and that you have confirmed that the button is being simulated properly.

I found this link:

http://zythmer.acyclic.org/files/docs/xev_and_xmodmap

with quote that was interesting:

Typically a good choice is the Windows key since there are no binds to it by default [emphasis mine].

I didn't look carefully at the details, but it seems to walk through the process of binding it for xmodmap

share|improve this answer

You must log in to answer this question.

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