How to increase horizontal mouse scroll sensitivity?

7,253

Solution 1

Okay, I suddenly had an idea that solved this issue:

1) Remap the "buttons" associated with horizontal scroll from 6/7 to the unused ids 10/11 with xinput to avoid the recursive infinity loop. Call this from ~/.profile or similar (inspired by this answer):

#!/bin/bash
# improve Logitech MX Master horizontal scroll sensitivity
logitech_mouse_id=$(xinput | grep "Logitech MX Master" | sed 's/.*id=\([0-9]\+\).*/\1/')
xinput set-button-map $logitech_mouse_id 1 2 3 4 5 10 11 8 9

2) Trigger repeated horizontal scrolling events with xdotool. Settings in ~/.xbindkeysrc:

# thumb wheel up => scroll left
"xdotool click --repeat 10 --delay 1 6"
   b:10

# thumb wheel down => scroll right
"xdotool click --repeat 10 --delay 1 7"
   b:11

Solution 2

Solution that doesn't require button remappings, that worked for me, though I'm not on Mint, I'm using Ubuntu and Logitech MX Master 3 mouse.

  1. Find your mouse by probing cat /sys/class/input/event3/device/name, try different numbers after event, it was 3 in my case. Remember the result name.
  2. Create file /etc/udev/hwdb.d/99-mx3-click-angle.hwdb (you can pick another name, just make it start with 99).
  3. The content of the file:
mouse:*:name:Logitech MX Master 3000:
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=10

Put the name of your device that you got on the 1st stage instead of my Logitech MX Master 3000.

  1. update the hwdb:
sudo udevadm hwdb -u
  1. Disconnect and reconnect your mouse.
  2. To verify that the attribute was added run
> udevadm info --query=all --name=/dev/input/event3 | grep MOUSE_WHEE

E: MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=10

here use your number from stage 1 instead of my event3.


Play with different values for MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL, 10 works best for me.

There are also other parameters to tune. I'm adjusting the vertical scroll speed with MOUSE_WHEEL_CLICK_ANGLE=2, for example, because my Logitech MX Master 3 was scrolling too fast on default settings.

Based on this comment.

Share:
7,253

Related videos on Youtube

orzechow
Author by

orzechow

Updated on September 18, 2022

Comments

  • orzechow
    orzechow over 1 year

    I have a Logitech MX Master mouse with a vertical and horizontical scroll wheel. Everything works fine, mouse events work / can be remapped, both scroll wheels do their job, etc. The only annoying thing is that horizontal scrolling is very slow and thus nearly useless...

    So how can I adjust the scroll wheel sensitivity for the horizontal scroll wheel?

    I have tried quite a lot of options with no luck:

    • solaar does not provide any additional settings.
    • xinput has a scrolling related setting Evdev Scrolling Distance, but it did not seem to change more than the scrolling direction.
    • Neither did the xconf setting HorizResolution change the scrolling behavior (like suggested here).
    • As I found out with xev, the scroll wheel triggers button click events (buttons 6 and 7). So I tried a xbindkeys binding that triggers the button click three times again (using xdotool). This obviously resulted in a infinite loop of event → trigger → event → trigger → ... bringing the xserver to 100% CPU. No sleep delays or similar helped...
    • None of the XF86 keyboard symbols seems to represent vertical scrolling → no luck with remapping button 6/7 to a XF86 keyboard event.

    Any ideas how to get the horizontal mouse scrolling faster? I'd be glad about help!

    My system: Linux Mint 18 (based on Ubuntu 16.04 LTS), KDE Plasma 5.8.5

  • Kapenaar
    Kapenaar about 7 years
    This works great! Thanks for sharing. I added a little if statement in the .profile code, so that weird things cannot happen when the mouse is not plugged in.
  • Ben Stern
    Ben Stern over 6 years
    Based upon the idea above, I wrote a libevdev client which listens at a lower level for horizontal scroll wheel events and repeats them. It's under the GPL: evwheelmult.
  • qwazix
    qwazix about 5 years
    awk-fu not needed as this works xinput set-button-map 'Logitech MX Master' 1 2 3 4 5 10 11 8 9
  • MK-asp.netCoreDeveloper
    MK-asp.netCoreDeveloper over 4 years
    I'd clean up & merge that grep | sed command: logitech_mouse_id=$(xinput | sed -nr 's/.*Logitech M.*id=([0-9]+).*/\1/p')