Any one who has upgraded to Mac OS 10.7 Lion will will have had the new inverted scrolling (natural, as Apple call it) which I described in my last post.
However, while many may have found it irritating at first but chose to power through and get used to it, have got too used to it. Now, other computers seem just wrong.
I hate it when it turns out Apple were right but it would seem that moving the page up and down rather than the scroll bar really is just, natural.
So here’s how you Linux folk can get Lion like scrolling working on your computer. I’ve been using Ubuntu but I’m sure we’ll see it working on other distributions.
Your first command is:
This will show you a list of devices, work out which one is your trackpad or mouse. From my screenshot, you can see that my Trackpad’s ID is 13.
xinput test 13
Replace the 13 with whatever your device ID was.
Now scroll up a little and then scroll down a little, finally press Ctrl+C to end the test. From this you can see the mapping of your scroll function. In my screen shot you can see that my scrolling up as button 4 and scrolling down as button 5, obviously they’re not really buttons but you’re not supposed to think of that ;]
Work out what your scroll button numbers are, you’re going to need them.
Now for the actual change, the button mapping of your device will be set up as something like 1 2 3 4 5. In my case; 1, 2 and 3 are likely left, right and middle button; 4 and 5 we know for my case are the scroll, obviously they may be different for you, take note of these along with the device number you already know.
So of course all we’re needing to do is swap these round, here we go:
xinput set-button-map 13 1 2 3 5 4
Now pay attention to how that’s made up; we’ve got your device number in there (I’m 13 remember) and we’ve flipped round the numbers that we know are mapped to our scrolling, (5 and 4)… also, while I’m patronising you like this, don’t forget those spaces. Now go try it out, look, it’s working! Aren’t you clever.
You’re not done yet!
Now you can set up an xorg option (Option zAxisMapping “5 4″) but I’m still in my patronising mood and thinking I should just give you the easy option so all we’re going to do is take that last command we typed in (xinput set-button-map 13 1 2 3 5 4) and make it run on startup.
So open up your System Settings and choose Startup Applications.