Bug 1230945 - libinput does not allow remapping of all mouse buttons
Summary: libinput does not allow remapping of all mouse buttons
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-libinput
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Peter Hutterer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-11 20:22 UTC by Alexandre Silva Lopes
Modified: 2017-10-04 09:39 UTC (History)
5 users (show)

Fixed In Version: xorg-x11-drv-libinput-0.11.0-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-10 19:05:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
evemu-record of Logitech MX Revolution mouse (35.55 KB, text/plain)
2015-06-12 19:14 UTC, Alexandre Silva Lopes
no flags Details

Description Alexandre Silva Lopes 2015-06-11 20:22:23 UTC
Description of problem:
I have a Logitech MX Revolution mouse, which has 11 buttons, but they are mapped from 1 to 17. There are NO buttons 2, 10, 11, 12, 14, 16. xinput reports that my mouse has "Buttons supported: 11" and does not allow me to remap button 17 to 2, which I was doing with evdev.


Version-Release number of selected component (if applicable): 0.17.0-1.fc22


How reproducible: allways


Steps to Reproduce:
1. Connect a Logitech MX Revolution mouse
2. Setup xorg to use libinput for the mouse
3. Get the current mapping: xinput --get-button-map 10 (10 is dev id) reports 1 2 3 4 5 6 7 8 9 10 11
4. Try to set a new map: xinput --set-button-map 10 1 17 3 4 5 6 7 8 9 10 11
5. Check new mapping: xinput --get-button-map 10 (10 is dev id) reports 1 17 3 4 5 6 7 8 9 10 11


Actual results:
se xev or xinput test 10 and verify that button17 events are still sent, instead of button2

Expected results:
With the new mapping, button2 events should have been sent


Additional info:

Comment 1 Peter Hutterer 2015-06-12 00:58:40 UTC
pls attach an evemu-record of the device where you press each button once, thanks.

Comment 2 Alexandre Silva Lopes 2015-06-12 19:14:35 UTC
Created attachment 1038136 [details]
evemu-record of Logitech MX Revolution mouse

Comment 3 Alexandre Silva Lopes 2015-06-12 19:16:06 UTC
(In reply to Peter Hutterer from comment #1)
> pls attach an evemu-record of the device where you press each button once,
> thanks.

Done. Pressed all the buttons, including using the wheel in both horizontal and vertical directions.

Comment 4 Peter Hutterer 2015-06-15 00:28:21 UTC
doesn't a wheel click produce a middle button event on those devices?

I'll add a quick fix to the driver to get this working for now, but long-term we probably want to fix those holes and get the mouse to have only the buttons it advertises. Can you label each physical button and what the function is supposed to be. There's left and right obviously and I suspect the wheel does middle click. How about the other buttons (and where are they?)


also, while I have you here can you run the mouse-dpi-tool please? should be 800@125 but confirmation would be nice.

Comment 5 Fedora Update System 2015-06-15 00:42:22 UTC
xorg-x11-drv-libinput-0.11.0-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/xorg-x11-drv-libinput-0.11.0-1.fc22

Comment 6 Alexandre Silva Lopes 2015-06-17 19:41:21 UTC
Yes, the wheel click can produce a middle mouse button event, but I forgot that, because I need to use revoco (https://github.com/sebastien/revoco) to activate that function. Otherwise, it changes spin mode between "click-to-click" and "free spin". That's why I want to remap middle mouse button to button 17.

Regarding buttons, there's the usual 1, 2 and 3, 4 and 5 for vertical scroll, 6 and 7 for horizontal scroll, 8 and 9 are back and forward, and there's a thumb button, which looks like a wheel but doesn't spin. It produces button 13 events when I move it forward, button 15 when I move it backwards, and button 17 events when I press it. It is supposed to be used to switch between applications in Windows. There a nice review with good pictures here: http://www.trustedreviews.com/Logitech-MX-Revolution-Mouse-review

Actually, mouse-dpi-tool reports 800@200 and, in case you want the hwdb match, mouse:usb:v046dpc51a:name:Logitech USB Receiver:

Thanks for your support!

Comment 7 Fedora Update System 2015-06-18 13:22:51 UTC
Package xorg-x11-drv-libinput-0.11.0-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xorg-x11-drv-libinput-0.11.0-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10063/xorg-x11-drv-libinput-0.11.0-1.fc22
then log in and leave karma (feedback).

Comment 8 Peter Hutterer 2015-06-23 06:00:07 UTC
ok, added the hwdb entry to the systemd repo, should show up with one of the updates in the future. thanks for that.

Benjamin, do you have an opinion on remapping the buttons? The thumb wheel seems to be a good candidate for BTN_BACK/BTN_FORWARD, BTN_TASK for the wheel click is debatable. Or we could just leave it as is and accept that there's whole in the range (which X can't deal with, but Wayland shouldn't care too much).

Comment 9 Benjamin Tissoires 2015-06-24 15:32:18 UTC
(In reply to Peter Hutterer from comment #8)
> Benjamin, do you have an opinion on remapping the buttons? The thumb wheel
> seems to be a good candidate for BTN_BACK/BTN_FORWARD, BTN_TASK for the
> wheel click is debatable. Or we could just leave it as is and accept that
> there's whole in the range (which X can't deal with, but Wayland shouldn't
> care too much).

I believe a kernel patch to change the mapping should not take long to write. I am just a little bit worried by the name of the usb dongle "Logitech USB Receiver" which makes me fear that this dongle might be used for other mice.

I will check with Logitech if they have more technical information. Do not hold your breath though, I have no idea if they are still willing to support a nearly 10 year old mouse.

Comment 10 Peter Hutterer 2015-06-24 23:31:54 UTC
Benjamin and I talked about this today and we've decided we're not going to fix this for the MX Revolution. It's an old device and not sold by Logitech anymore. Fixing this now would break existing user's custom mappings (and this bug indicates virtually all users will have a custom mapping), causing further bug reports, regressions, etc. So overall, not worth the effort/cost.

We're looking into fixing the current model though, the MX Master.

Comment 11 Alexandre Silva Lopes 2015-06-29 12:36:01 UTC
That's fine for me. I have full functionality (at least the same I had before) with xorg-x11-drv-libinput-0.11.0-1.fc22.

Again, thanks for the support!

Comment 12 Fedora Update System 2015-07-10 19:05:03 UTC
xorg-x11-drv-libinput-0.11.0-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 raster 2017-10-04 09:39:19 UTC
Hi:

I migrated from X to Wayland today and have exactly the same problem: my mouse (a logitech M560) has 9 buttons (left, middle, right, wheel up, wheel down, wheel left, wheel right, and two buttons for the thumb). When using "xinput test" they map to 1, 2, 3, 4, 5, 6, 7, 10, 11 respectively, but "xinput get-button-map" returns "1 2 3 4 5 6 7 8 9 10". If I try to remap the button 11 to be used as the middle button, it doesn't work: the physical middle button can be remapped to emit the event for the 11 event button, but it is not possible to remap the last thumb button (the one that returns the 11 event button) to emit the 2 event button ("middle button").


Note You need to log in before you can comment on or make changes to this bug.