I've been experimenting a bit when trying to write a script for toggling the scrolling direction; com.apple.swipescrolldirection.

There are plenty of examples of people doing this online, and several approaches worked for me. E.g the following, which turns natural scrolling off:

$ defaults read -g com.apple.swipescrolldirection

$ defaults write -g com.apple.swipescrolldirection -bool false

$ defaults read -g com.apple.swipescrolldirection

However, the above does not take effect immediately, one has to log off and on again for it to work.

To attempt to force the changes to take effect without logging out I attempted to kill my users cfprefsd process. This caused a new process to start up, but the changes did not take effect.

Now to my problem. It seems my experimenting has caused something to break, cause I'm no longer able to change my scrolling direction. Not even from the System Preferences gui:

System Preferences Mouse window

In fact, if I try to check 'Scroll direction: natural' it will uncheck itself. The exact same thing happens if I try to check 'Scroll direction: natural' in the 'Trackpad' window of System Preferences. And if I do $ defaults read -g com.apple.swipescrolldirection the value won't have changed.

Anyone got any ideas?


2 Answers 2


Use defaults write -g com.apple.swipescrolldirection -bool NO

If it's automatically checking itself in the GUI it's because you have a invalid value set, IE: -int 0/1 using the BOOL value will restore functionality.

  • Doesn't work (anymore?) for me.
    – Yoann
    Commented Sep 29, 2022 at 12:50

I've found the only way is to restart the mac after you run one of those commands. That sets it for me.

You must log in to answer this question.

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