Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Out of the box, this Logitech M325 mouse works great with one issue: cannot use the scroll wheel for horizontal scrolling. It acts as forward or back in the browsers or does nothing in other windows.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

In order to make the horizontal scrolling work, I had to remap the mouse buttons. Check the mapping using xmodmap -pp:

[sly@SlyLap ~]$ xmodmap -pp
There are 24 pointer buttons defined.

    Physical        Button
     Button          Code
        1              1
        2              2
        3              3
        4              4
        5              5
        6              6
        7              7
        8              8
        9              9
       10             10
       11             11
       12             12
       13             13
       14             14
       15             15
       16             16
       17             17
       18             18
       19             19
       20             20
       21             21
       22             22
       23             23
       24             24

Use xev to find out the button codes for horizontal scrolling:

[sly@SlyLap ~]$ xev
...
ButtonPress event, serial 29, synthetic NO, window 0x5400001,
    root 0xad, subw 0x5400002, time 173143560, (21,37), root:(25,493),
    state 0x0, button 8, same_screen YES
...
ButtonPress event, serial 29, synthetic NO, window 0x5400001,
    root 0xad, subw 0x5400002, time 173126732, (21,37), root:(25,493),
    state 0x0, button 9, same_screen YES

From here I can see the left/right button codes are 8/9. Since the synaptics driver uses the buttons 6/7 for left/right scrolling, I simply needed to swap the order of how the buttons are declared. To change the mapping:

xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"

This will swap 8/9 6/7 which will make the horizontal scrolling work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.