7

I would like to use natural scroll with touchpad and normal scroll when I am using a normal USB mouse. I don't want to go to the preferences dialog to change the settings every time I need the switch. Thus I need a command line tool to help me with that.

Here is what I put in my ~/.bashrc:

alias scr-natural='defaults write NSGlobalDomain com.apple.swipescrolldirection -bool TRUE && killall cfprefsd'
alias scr-normal='defaults write NSGlobalDomain com.apple.swipescrolldirection -bool FALSE && killall cfprefsd'

After I run scr-normal and then

defaults read NSGlobalDomain com.apple.swipescrolldirection

I can see the value is 0. However the behavior is still the natural scrolling.

I searched a lot of places and it says the preference dialog will set the new value and force system to reload the ~/Library/Preferences/.GlobalPreferences.plist file. I couldn't find anyway to force system to reload that file through command line and I get stuck over there.

Can anyone help out?

1
  • for anyone wandering here: you can semi-automate it with sudo pkill loginwindow, which forces you to logout and seems to be the only way to apply the setting.
    – rwenz3l
    Commented Dec 5, 2017 at 17:17

1 Answer 1

0

Okay, not a direct answer to this question, but a answer to solve my real problem:

Go to http://pilotmoon.com/scrollreverser/ and download the software, it can tweak the system so that I can use natural scroll for trackpad and normal scroll for my external USB mouse

You must log in to answer this question.

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