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
2

2 Answers 2

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)

5
  • 3
    This works, but does not survive a reboot.
    – Bram
    Sep 18, 2013 at 3:43
  • you could create a script to run on login, but this method still doesn't reverse the scroll in system windows, e.g. Files
    – Tom Imrei
    Dec 12, 2013 at 15:41
  • Do 3 2 1 5 4 if you prefer the primary button to be the on the right. Apr 10, 2015 at 17:19
  • For complete natural scrolling use: xinput set-button-map 13 1 2 3 5 4 7 6 Apr 23, 2015 at 12:12
  • Surviving a reboot is not the real problem. If for some reason you disable Bluetooth and re-enable it again, settings will get lost. So it's a matter to run the script when the mouse gets connected. Mar 8, 2016 at 21:26
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.)

1
  • Can't you just add xinput set-button-map $mouse_id 1 2 3 5 4 to startup applications? Apr 10, 2015 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .