Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3424

Hardware • Understanding libinput wrt Mouse ButtonRebinds

$
0
0
I can't get button binding to work on a basic tilt-wheel mouse - I want to bind the scroll-wheel tilt-left & tilt-right buttons.

I've asked some specific questions below, but will be grateful for any info to help me understand libinput better.

I've been testing on clean Debian 12.4 KDE install with a Cherry MC-2000 mouse.

Issue 1:
System Settings → Input Devices → Mouse → Re-bind Additional Mouse Buttons
This does not detect the tilt-left and tilt-right clicks (I understand that by design left/middle/right buttons cannot be bound).
When I connected a 5-button Dell mouse, it could detect the extra side buttons but again not tilt-left/tilt-right.

Issue 2:
I manually added some bindings to ~/.config.kcminputrc

Code:

[ButtonRebinds][Mouse]ExtraButton6=Key,AExtraButton7=Key,B
The bindings now appeared in System Settings → Input Devices → Mouse → Re-bind Additional Mouse Buttons.
On the 5 button mouse, the tilt left/right were now correctly sending "a" & "b", but not on the Cherry.

After some testing with libinput-tools, I noticed two differences between the two mice:
Difference 1: libinput list-devices
The 5-button Dell mouse has one device: {Dell Premium USB Optical Mouse}
The Cherry mouse has three devices: {Cherry USB Optical Mouse System Control, Cherry USB Optical Mouse, Cherry USB Optical Mouse Consumer Control}. These are marked as {keyboard, pointer, keyboard pointer} respectively.
❓ Why does the simpler Cherry mouse have the extra devices?
❓ Where are they configured (so I can potentially alter the capabilities and/or remove the extra devices)?
❓ Is it possible to force the Cherry mouse to appear as a more generic mouse?

Difference 2: libinput debug-events (tested with ButtonRebinds removed)
Tilt-Left on Cherry generates one event:
event4 POINTER_SCROLL_WHEEL +8.112svert 0.00/0.0 horiz -15.00/-120.0* (wheel)
Tilt-Left on 5-button Dell generates three events:
event15 POINTER_SCROLL_WHEEL +23.104svert 0.00/0.0 horiz -15.00/-120.0* (wheel)
event15 POINTER_BUTTON +23.104s??? (281) pressed, seat count: 1
event15 POINTER_BUTTON +23.320s??? (281) released, seat count: 0
❓ How can I get the Cherry mouse to also generate the POINTER_BUTTON events?

Here is more detailed testing output:
lsusb

Code:

Bus 002 Device 003: ID 0930:6544 Toshiba Corp. TransMemory-Mini / Kingston DataTraveler 2.0 StickBus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching HubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 001 Device 009: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel MouseBus 001 Device 004: ID 046a:b092 CHERRY USB Optical MouseBus 001 Device 003: ID 03f0:0024 HP, Inc KU-0316 KeyboardBus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
libinput list-devices

Code:

Device:           Power ButtonKernel:           /dev/input/event1Group:            1Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           Video BusKernel:           /dev/input/event2Group:            2Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           Power ButtonKernel:           /dev/input/event0Group:            3Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           CHICONY HP Basic USB KeyboardKernel:           /dev/input/event3Group:            4Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           Cherry USB Optical Mouse System ControlKernel:           /dev/input/event7Group:            5Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           Cherry USB Optical MouseKernel:           /dev/input/event4Group:            5Seat:             seat0, defaultCapabilities:     pointer Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      disabledNat.scrolling:    disabledMiddle emulation: disabledCalibration:      n/aScroll methods:   buttonClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   flat *adaptiveRotation:         n/aDevice:           Cherry USB Optical Mouse Consumer ControlKernel:           /dev/input/event6Group:            5Seat:             seat0, defaultCapabilities:     keyboard pointer Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    disabledMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/aDevice:           Dell Premium USB Optical MouseKernel:           /dev/input/event15Group:            6Seat:             seat0, defaultCapabilities:     pointer Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      disabledNat.scrolling:    disabledMiddle emulation: disabledCalibration:      n/aScroll methods:   buttonClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   flat *adaptiveRotation:         n/aDevice:           HP WMI hotkeysKernel:           /dev/input/event9Group:            7Seat:             seat0, defaultCapabilities:     keyboard Tap-to-click:     n/aTap-and-drag:     n/aTap drag lock:    n/aLeft-handed:      n/aNat.scrolling:    n/aMiddle emulation: n/aCalibration:      n/aScroll methods:   noneClick methods:    noneDisable-w-typing: n/aDisable-w-trackpointing: n/aAccel profiles:   n/aRotation:         n/a
libinput debug-events (Cherry mouse)

Code:

-event1   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k-event2   DEVICE_ADDED            Video Bus                         seat0 default group2  cap:k-event0   DEVICE_ADDED            Power Button                      seat0 default group3  cap:k-event3   DEVICE_ADDED            CHICONY HP Basic USB Keyboard     seat0 default group4  cap:k-event7   DEVICE_ADDED            Cherry USB Optical Mouse System Control seat0 default group5  cap:k-event4   DEVICE_ADDED            Cherry USB Optical Mouse          seat0 default group5  cap:p left scroll-nat scroll-button-event6   DEVICE_ADDED            Cherry USB Optical Mouse Consumer Control seat0 default group5  cap:kp scroll-nat-event9   DEVICE_ADDED            HP WMI hotkeys                    seat0 default group6  cap:k-event4   POINTER_BUTTON          +0.000sBTN_LEFT (272) pressed, seat count: 1 event4   POINTER_BUTTON          +0.168sBTN_LEFT (272) released, seat count: 0 event4   POINTER_BUTTON          +1.440sBTN_RIGHT (273) pressed, seat count: 1 event4   POINTER_BUTTON          +1.600sBTN_RIGHT (273) released, seat count: 0 event4   POINTER_BUTTON          +3.264sBTN_MIDDLE (274) pressed, seat count: 1 event4   POINTER_BUTTON          +3.416sBTN_MIDDLE (274) released, seat count: 0 event4   POINTER_SCROLL_WHEEL    +8.112svert 0.00/0.0 horiz -15.00/-120.0* (wheel) event4   POINTER_SCROLL_WHEEL    +9.992svert 0.00/0.0 horiz 15.00/120.0* (wheel) event4   POINTER_SCROLL_WHEEL    +13.192svert -15.00/-120.0* horiz 0.00/0.0 (wheel) event4   POINTER_SCROLL_WHEEL    +13.792svert -15.00/-120.0* horiz 0.00/0.0 (wheel) event4   POINTER_SCROLL_WHEEL    +14.088svert -15.00/-120.0* horiz 0.00/0.0 (wheel) event4   POINTER_SCROLL_WHEEL    +20.080svert 15.00/120.0* horiz 0.00/0.0 (wheel) event4   POINTER_SCROLL_WHEEL    +20.208svert 15.00/120.0* horiz 0.00/0.0 (wheel) event4   POINTER_SCROLL_WHEEL    +20.848svert 15.00/120.0* horiz 0.00/0.0 (wheel) event4   POINTER_MOTION          +26.576s  0.00/ -0.30 ( +0.00/ -1.00) event4   POINTER_MOTION          +26.584s  7.63/-24.43 ( +5.00/-16.00) event4   POINTER_MOTION          +26.592s 18.00/-22.00 ( +9.00/-11.00) event4   POINTER_MOTION          +26.600s 28.00/-30.00 (+14.00/-15.00) event4   POINTER_MOTION          +26.608s 28.00/-30.00 (+14.00/-15.00)

libinput debug-events (Dell mouse)

Code:

-event1   DEVICE_ADDED            Power Button                      seat0 default group1  cap:k-event2   DEVICE_ADDED            Video Bus                         seat0 default group2  cap:k-event0   DEVICE_ADDED            Power Button                      seat0 default group3  cap:k-event3   DEVICE_ADDED            CHICONY HP Basic USB Keyboard     seat0 default group4  cap:k-event7   DEVICE_ADDED            Cherry USB Optical Mouse System Control seat0 default group5  cap:k-event4   DEVICE_ADDED            Cherry USB Optical Mouse          seat0 default group5  cap:p left scroll-nat scroll-button-event6   DEVICE_ADDED            Cherry USB Optical Mouse Consumer Control seat0 default group5  cap:kp scroll-nat-event15  DEVICE_ADDED            Dell Premium USB Optical Mouse    seat0 default group6  cap:p left scroll-nat scroll-button-event9   DEVICE_ADDED            HP WMI hotkeys                    seat0 default group7  cap:k-event15  POINTER_BUTTON          +0.000sBTN_LEFT (272) pressed, seat count: 1 event15  POINTER_BUTTON          +0.184sBTN_LEFT (272) released, seat count: 0 event15  POINTER_BUTTON          +1.192sBTN_RIGHT (273) pressed, seat count: 1 event15  POINTER_BUTTON          +1.376sBTN_RIGHT (273) released, seat count: 0 event15  POINTER_BUTTON          +8.360sBTN_MIDDLE (274) pressed, seat count: 1 event15  POINTER_BUTTON          +8.688sBTN_MIDDLE (274) released, seat count: 0 event15  POINTER_SCROLL_WHEEL    +23.104svert 0.00/0.0 horiz -15.00/-120.0* (wheel) event15  POINTER_BUTTON          +23.104s??? (281) pressed, seat count: 1 event15  POINTER_BUTTON          +23.320s??? (281) released, seat count: 0 event15  POINTER_SCROLL_WHEEL    +24.912svert 0.00/0.0 horiz 15.00/120.0* (wheel) event15  POINTER_BUTTON          +24.912s??? (280) pressed, seat count: 1 event15  POINTER_BUTTON          +25.144s??? (280) released, seat count: 0 event15  POINTER_SCROLL_WHEEL    +33.640svert -15.00/-120.0* horiz 0.00/0.0 (wheel) event15  POINTER_SCROLL_WHEEL    +34.016svert -15.00/-120.0* horiz 0.00/0.0 (wheel) event15  POINTER_SCROLL_WHEEL    +35.512svert 15.00/120.0* horiz 0.00/0.0 (wheel) event15  POINTER_SCROLL_WHEEL    +35.792svert 15.00/120.0* horiz 0.00/0.0 (wheel) event15  POINTER_BUTTON          +37.648sBTN_EXTRA (276) pressed, seat count: 1 event15  POINTER_BUTTON          +37.912sBTN_EXTRA (276) released, seat count: 0 event15  POINTER_BUTTON          +38.672sBTN_SIDE (275) pressed, seat count: 1 event15  POINTER_BUTTON          +38.968sBTN_SIDE (275) released, seat count: 0 event15  POINTER_MOTION          +40.752s  0.30/  0.00 ( +1.00/ +0.00) event15  POINTER_MOTION          +40.760s 19.70/ -2.81 (+14.00/ -2.00) event15  POINTER_MOTION          +40.768s 50.00/ -6.00 (+25.00/ -3.00) event15  POINTER_MOTION          +40.776s 38.00/ -2.00 (+19.00/ -1.00)
Cheers.

Statistics: Posted by Devlin — 2024-02-04 14:08 — Replies 0 — Views 40



Viewing all articles
Browse latest Browse all 3424

Trending Articles