You are not logged in.

#1 2015-10-25 16:05:41

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Joystick using xboxdrv sending unwanted mouse events [SOLVED]

Greetings everyone,

I have a Logitech Wireless F710 gamepad that is working under xboxdrv. All is fine, except that when I press both left and right triggers together, I get an unwanted mouse 2 event in xev, which corresponds to a middle mouse button press. This is annoying for me because I like to play first person shooters, and aiming down sights (left trigger) and shooting (right trigger) at the same time causes nothing to happen or invokes whatever mouse 3 was bound to last.

Here is my xboxdrv config:

[dmb@dmb-arch-laptop ~]$ cat .gamepad_config/xboxdrv.config 
[xboxdrv]
ui-clear=true
trigger-as-button = true
dpad-as-button = true

[ui-axismap]
x1=KEY_A:KEY_D
y1=KEY_W:KEY_S
x2^dead:4000 = REL_X:750:-1
y2^dead:4000 = REL_Y:750:-1

[ui-buttonmap]
a = KEY_SPACE
b = KEY_C
x = KEY_R:KEY_F:250
y = KEY_1
rb = KEY_G
lb = KEY_4
tl = KEY_LEFTSHIFT
tr = KEY_V

[ui-buttonmap]
lt = BTN_RIGHT
rt = BTN_LEFT

[ui-buttonmap]
dl = KEY_N
dr = KEY_6
du = KEY_7
dd = KEY_5

[ui-buttonmap]
start = KEY_TAB
back  = KEY_ESC

# EOF #
[dmb@dmb-arch-laptop ~]$ 

And this is my 50-joystick.conf, used to prevent the mouse from going haywire and staying stuck to one side.

[dmb@dmb-arch-laptop ~]$ cat /etc/X11/xorg.conf.d/50-joystick.conf 
Section "InputClass"
        Identifier "joystick catchall"
        MatchIsJoystick "on"
        MatchDevicePath "/dev/input/event*"
        Driver "xboxdrv"
        Option "StartMouseEnabled" "False"
EndSection
[dmb@dmb-arch-laptop ~]$ 

I also have a a 50-synaptics.conf in the same directory (/etc/X11/xorg.conf.d/) which is larger but I can post if needed.

What I am trying to do is eliminate the unwanted mouse 3 or middle mouse event when pressing both triggers together. I'd like to have one left mouse and one right mouse event from my triggers. Pressing both at the same time should not cause a middle mouse event.

Thank you for the help,
JohnBobSmith

Last edited by JohnBobSmith (2015-10-25 18:09:07)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#2 2015-10-25 18:08:45

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Joystick using xboxdrv sending unwanted mouse events [SOLVED]

I feel really dumb right now...

I solved the issue. What I did was, instead of binding triggers to mouse buttons, it occurred to me I can use literally any other buttons for the job. For that purpose, I chose left brace "[" and right brace "]". Now the triggers work fine, except I cant do a literal mouse click. So to fix that, I bound my "A" and "B" keys to send the left mouse and right mouse events WHEN HELD, respectively. Now I can still click like a mouse through menus when needed, and have no interference otherwise.

I hope no one else has such to go through such embarrassment. Perhaps they wont need to now that I've done it for them. sad

Final xboxdrv config:

[dmb@dmb-arch-laptop ~]$ cat .gamepad_config/xboxdrv.config 
[xboxdrv]
ui-clear=true
trigger-as-button = true
dpad-as-button = true

[ui-axismap]
x1=KEY_A:KEY_D
y1=KEY_W:KEY_S
x2^dead:4000 = REL_X:750:-1
y2^dead:4000 = REL_Y:750:-1

[ui-buttonmap]
a = KEY_SPACE:BTN_LEFT:250
b = KEY_C:BTN_RIGHT:250
x = KEY_R:KEY_F:250
y = KEY_1
rb = KEY_G
lb = KEY_4
tl = KEY_LEFTSHIFT
tr = KEY_V

[ui-buttonmap]
lt = KEY_LEFTBRACE
rt = KEY_RIGHTBRACE

[ui-buttonmap]
dl = KEY_N
dr = KEY_6
du = KEY_7
dd = KEY_5

[ui-buttonmap]
start = KEY_TAB
back  = KEY_ESC

# EOF #
[dmb@dmb-arch-laptop ~]$ 

Topic solved. I hope someone finds this useful.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

Board footer

Powered by FluxBB