You are not logged in.

#1 2014-08-16 15:31:32

Wilhelm
Member
Registered: 2012-12-06
Posts: 38

Middle mouse button

Hello,

I have a Logitech MX Air mouse. It does not have a middle mouse button, which I would be glad to have.
There's a touch scroll between the left and right mouse buttons. In both ends of this touch scroll is also buttons to scroll up and down. Meaning there's an actual button between left and right mouse buttons in addition to touch scroll.
On Windows I had Logitech's own control panel to change the actions of the buttons. The "Scroll down"-button on the touch scroll was set as a middle mouse button. So, there's the button and it is possible to distinguish between scrolling down on the touch scroll and pressing this scroll down -button.
On linux, however, trying to set the scroll down -button as a middle mouse also sets scrolling down on the touch pad to middle mouse.
What would be the proper approach to change only the scroll down -button to behave as a middle mouse button without affecting scrolling down on the touch pad?

Offline

#2 2014-08-18 16:09:37

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Middle mouse button

Does xev register those buttons actions?

Edit: This might be of interest:
http://hardy.dropbear.id.au/blog/2007/1 … e-in-linux

Last edited by emeres (2014-08-18 16:12:22)

Offline

#3 2014-08-18 16:45:35

Wilhelm
Member
Registered: 2012-12-06
Posts: 38

Re: Middle mouse button

Yes, it does. The output for scrolling down and pressing the scroll down -button is the same.

ButtonPress event, serial 32, synthetic NO, window 0x2400001,
    root 0x2a6, subw 0x0, time 337888326, (-2,511), root:(2880,513),
    state 0x10, button 5, same_screen YES

ButtonRelease event, serial 32, synthetic NO, window 0x2400001,
    root 0x2a6, subw 0x0, time 337888326, (-2,511), root:(2880,513),
    state 0x1010, button 5, same_screen YES

ButtonPress event, serial 32, synthetic NO, window 0x2400001,
    root 0x2a6, subw 0x0, time 337891482, (-2,511), root:(2880,513),
    state 0x10, button 5, same_screen YES

ButtonRelease event, serial 32, synthetic NO, window 0x2400001,
    root 0x2a6, subw 0x0, time 337891482, (-2,511), root:(2880,513),
    state 0x1010, button 5, same_screen YES

Offline

#4 2014-08-18 17:16:56

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Middle mouse button

There probably are better methods, you could use xbindkeys to run 'xdotool mousedown 3' (or maybe 2) with the appropriate keys. You may need to run 'xdotool mouseup 3' afterwards.

Edit: Since there is no real distinction between scrolling and pressing the button, it could be problematic.

Edit2: https://wiki.archlinux.org/index.php/MX1000_Buttons

Last edited by emeres (2014-08-18 17:23:46)

Offline

#5 2014-08-18 18:53:17

Wilhelm
Member
Registered: 2012-12-06
Posts: 38

Re: Middle mouse button

The thing is that on Windows Logitech's own software can distinguish between these two.

Offline

#6 2014-08-18 20:46:02

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Middle mouse button

Well, then ask Logitech to port that software to GNU/Linux, I doubt it would work with wine, although usb drivers were partly/barely implemented. There is hidpoint.

You would have to look into the source code for the evdev or whatever that mouse uses. You could also look into evtest, maybe some part of configuration merges those two events into one. Without the hardware I can test nothing.

Offline

#7 2014-08-19 04:24:29

janepe
Member
From: Eastern Europe/Poland
Registered: 2014-08-19
Posts: 3

Re: Middle mouse button

@Offtopic

emeres wrote:

...
Edit: Since there is no real distinction between scrolling and pressing the button, it could be problematic.
...

This isn't 100% right but in most cases you are right. Xinput 2 in 2011 implemented smooth scrolling which isn't based on button events.
I want to highlight that because i have been interested about my wacom tablet, and why it is scrolling in granularized way and now i know, there is hope - driver is just outdated. Wacom driver is using buttons to handle scroll event. Hopefully it handle many touches(i think it's over 5). So, what we need is external application* which would be able to handle gestures. I've found one.. but it isn't the best one: touchegg. It lacks zoom on pinch, rotating gesture etc. but it is scrolling smooth with wacom tablet. Touchegg is abandoned(?), or very slowly developed. It is using ga GEIS C Api - [=URL=]

* gestures hardcoded in driver? it's not best idea

http://who-t.blogspot.de/2011/09/whats- … lling.html
http://www.x.org/releases/X11R7.7/doc/i … 2proto.txt - v2.2, March 2012: Multitouch support added

Last edited by janepe (2014-08-19 04:31:24)

Offline

#8 2014-08-19 10:19:43

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Middle mouse button

I have to take what I get, since the hardware is not available to me. If that scroll wheel/button part gets handled just like a touchpad, then there is easystroke, maybe that could work out..

Offline

#9 2014-08-19 14:59:19

Wilhelm
Member
Registered: 2012-12-06
Posts: 38

Re: Middle mouse button

easystroke is not able to distinguish between those. Both are registered as 5 (big number 5 appears in the field).

Offline

#10 2014-08-19 15:11:47

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Middle mouse button

Have you read what janepe wrote? I assume you can make scrolling motions over the surface of this 'scroll wheel'. Did you add the button 5 in preferences? You should be able to get the motions of scrolling and taping for button functionality inside easystroke, then emulate the middle mouse button and scroll wheel with them.

Last edited by emeres (2014-08-19 15:12:22)

Offline

Board footer

Powered by FluxBB