Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I toggle magic mouse one finger swipe pages gesture via terminal?

The command defaults write -g AppleEnableSwipeNavigateWithScrolls -bool NO triggers checkbox in System Preferences, but doesn't affect swiping gesture.

Checkbox toggle in System Preferences turns off swipe gesture instantly without need to restart magic mouse. I want to get same functionality from terminal.

share|improve this question

2 Answers 2

The one finger swipe gesture on the Magic Mouse is technically a scroll gesture and it can not be disabled, you can investigate the specifics further with my app NSMonitor.

To investigate the correspondence of ~/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist entries with user interface elements in System Preferences what i do is save a copy of that file as xml, edit something in system preferences, save it again and compare the two.

share|improve this answer

After some research I found out that you have to manipulate com.apple.driver.AppleBluetoothMultitouch.mouse.

I found a config at github from okine which had the following code:

# Disable full-screen swipe (two-finger swipe) on Magic Mouse
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseTwoFingerHorizSwipeGesture -int 0

This should work. Other options are

MouseButtonDivision = 55;
MouseButtonMode = OneButton;
MouseHorizontalScroll = 1;
MouseMomentumScroll = 1;
MouseTwoFingerDoubleTapGesture = 3;
MouseTwoFingerHorizSwipeGesture = 2;
MouseVerticalScroll = 1;
UserPreferences = 1;
share|improve this answer
    
I ask about 'one finger page swap' gesture (first checkbox in preferences). For example back/forward page in browser. Unfortunately com.apple.driver.AppleBluetoothMultitouch.mouse doesn't seem to have this option (correct option is in my original post which doesn't affect actual behaviour too, it just toggles first checkbox in Magic Mouse preferences). I guess there should be another command like "apply changed defaults to current workspace" which should actually do the work. –  dig Nov 27 '12 at 12:09
    
I don't have a Magic Mouse but since there are no other options for a Magic Mouse to configure and the equivalent gesture on a trackpad is a two finger swipe I assume that it is the same setting or not possible. Have you at least tried it? –  Pfitz Nov 27 '12 at 12:18
    
Sure I tried, didn't work for me. –  dig Nov 27 '12 at 14:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.