More on extra mouse buttons

Regarding my post on getting the scroll buttons working on my Logitech Marble Mouse, Jordi pointed out that the configuration can be improved even further. After trying out his configuration, I decided to RTFM and see if I could make it even better.

It turns out that the mouse options are all documented in the X11 man pages. On mystem, the mouse manual page is in /usr/X11/man/man4/mouse.4.gz. From reading this, it appears that there's no way to do what I really want (hold down the button and the window keeps scrolling), but I can make another small improvement on Jordi's configuration.

My small improvement is to add horizantal scrolling to the wheel emulation. See, with Jordi's configuration, holding button 4 while moving the mouse up and down will scroll the current window vertically. However, if the window also has a horizantal scroll bar, nothing will happen. That's because of the default values for XAxisMapping and YAxisMapping. The mapping for the Y-axis is to buttons 4 and 5, which is what we want, but the Y-axis mapping is off by default.

So, to change this, I added the following to my /etc/X11/xorg.conf file. Note that I changed the wheel emulation button and inertia to match my personal preference.
Option "EmulateWheel" "1"
Option "EmulateWheelButton" "5"
Option "EmulateWheelInertia" "10"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"

Now, if I have a window with horizantal and vertical scroll bars, I hold button 5 and move the mouse to get a Windows "auto-scroll" type behavior, where the window scrolls on both axes as the mouse moves. Things are just getting better all the time! At this rate, the pain of being a Linux user will be completely gone in no time!

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.