6

Has anyone managed to make natural scrolling work on Ubuntu 12.10? And with make work I mean to find a setup working for all the applications and not something based on Xmodmap which seems to be considered more an hack than a clean solution and in addition it doesn't enable natural scrolling on Nautilus.

I am asking that because the workaround I found to enable it with Magic Trackpads (i.e. tweak the setting Synaptic Scrolling Distance using xinput) doesn't work with Magic Mouses because such devices seem not to make use of the synaptic driver. Can you confirm that?

The following is the output of the command: xinput list-props 'Apple Magic Mouse'

Device 'Apple Magic Mouse':
Device Enabled (126):   1
Coordinate Transformation Matrix (128): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (247): 0
Device Accel Constant Deceleration (248):   5.000000
Device Accel Adaptive Deceleration (249):   1.000000
Device Accel Velocity Scaling (250):    5.000000
Device Product ID (243):    1452, 781
Device Node (244):  "/dev/input/event16"
Evdev Axis Inversion (251): 0, 0
Evdev Axes Swap (253):  0
Axis Labels (254):  "Rel X" (136), "Rel Y" (137), "Rel Horiz Wheel" (375), "Rel Vert Wheel" (376)
Button Labels (255):    "Button Left" (129), "Button Middle" (130), "Button Right" (131), "Button Wheel Up" (132), "Button Wheel Down" (133), "Button Horiz Wheel Left" (134), "Button Horiz Wheel Right" (135)
Evdev Middle Button Emulation (256):    0
Evdev Middle Button Timeout (257):  50
Evdev Third Button Emulation (258): 0
Evdev Third Button Emulation Timeout (259): 1000
Evdev Third Button Emulation Button (260):  3
Evdev Third Button Emulation Threshold (261):   20
Evdev Wheel Emulation (262):    0
Evdev Wheel Emulation Axes (263):   0, 0, 4, 5
Evdev Wheel Emulation Inertia (264):    10
Evdev Wheel Emulation Timeout (265):    300
Evdev Wheel Emulation Button (266): 4
Evdev Drag Lock Buttons (267):  0
gertvdijk
  • 67,007
  • 33
  • 188
  • 283
landimatte
  • 63
  • 1
  • 4
  • there are a gozillion of results on the internet for this, https://wiki.archlinux.org/index.php/Xmodmap http://onethingwell.org/post/8779215052/reverse-scrolling-x11 http://scottlinux.com/2011/07/20/os-x-lion-how-to-reverse-scroll-direction/ and many more http://www.google.com/search?q=xorg+natural+scrolling – user1849534 Dec 29 '12 at 17:08
  • 1
    I spent a lot of time on Google looking for possible solutions before ask that question here: unfortunately, none of them seemed to be a system-wide solution (ie. *natural scrolling* was not working with all the applications like for example `nautilus` which as I said above, does not honor `Xmodmap` setings). So please, if you have any kind of **working** solution, post it here. – landimatte Dec 29 '12 at 20:16

2 Answers2

8

Find the device ID of your magic mouse by doing:

xinput list

Then set the inverse scrolling by doing:

xinput set-button-map ID 1 2 3 5 4

(replacing ID with the ID of your device)

StuR
  • 196
  • 1
  • 4
1

In order to automatically change to natural scrolling in boot time, I did the following steps:

  1. I created a simple script, as follows:

    mouse_id=$(xinput list | grep 's Mouse' | egrep -o "[[:digit:]]{2}") 
    eval "$(xinput set-button-map $mouse_id 1 2 3 5 4)"
    
  2. I made a soft link in /bin directory

  3. Finally, I added this script to startup applications

After a restart it works perfectly.

My script is not perfect but it works. Maybe someone can suggest a better script for this or better approach. Fill free to edit my script. (I am using Ubuntu 12.04.)

karel
  • 110,292
  • 102
  • 269
  • 299
Khamidulla
  • 141
  • 9