6

Is it possible to disable magic mouse back-forward gesture only in XCODE? While in browser it is fine, in XCODE it just totaly unwanted feature for me.

Nik
  • 179
  • 1
  • 1
  • 9
  • Please for the log of god someone find an answer to this! – onedayitwillmake Nov 18 '12 at 01:52
  • 2
    You cannot configure application specific gestures in OS X itself. You could though try the free BetterTouchTool to add browser specific gestures for back/forward and disable the global system gesture. http://www.bettertouchtool.net – MacLemon Nov 23 '12 at 16:32
  • I was going to add an answer, but @MacLemon's suggestion is probably the best way for now. Unless you want to write a custom daemon that checks for the program being open and writing the string in the plist file for the mouse... – nerdwaller Nov 26 '12 at 00:21
  • @nerdwaller it would be great if you could tell me which string exactly disables 'swipe between pages' gesture :) I've already written daemon which tracks application switching, but I can't figure out what string I should write to defaults to disable pages swipe thing. – Nik Nov 26 '12 at 22:06
  • @dig It will be somewhere similar to this: `defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseHorizontalScroll -bool NO` That obviously disables Horizontal Scrolling, but it will be around there. I would look for you, but I got rid of my apple a while ago. Just run `sudo find / -name "com.apple.driver.AppleBluetoothMutitouch.mouse"`, should get you to the right file and you could look through for swipe gestures. The command to disable should look similar to the above. When I get home, I can try to find my wife's laptop if she will let me try it. – nerdwaller Nov 26 '12 at 22:18
  • @nerdwaller I've tried `defaults find com.apple.driver.AppleBluetoothMultitouch.mouse` which brings list of keys in mouse domain. However setting both MouseHorizontalScroll and MouseMomentumScroll to 0 doesn't do anything to scrolling at all:( I guess that checking box in GUI prefs tweaks other values somewhere – Nik Nov 26 '12 at 22:46
  • @nerdwaller actually via GUI I can disable swipe, but leave horizontal scrolling – Nik Nov 26 '12 at 22:52
  • continue my investigation, `defaults write -g AppleEnableSwipeNavigateWithScrolls -bool NO` clear checkbox in System Preferences, but does not actually disable swipe gesture – Nik Nov 26 '12 at 23:19

1 Answers1

5

In short: disable it on the mouse:

defaults write com.apple.dt.Xcode AppleEnableMouseSwipeNavigateWithScrolls -bool NO

for trackpads use:

defaults write com.apple.dt.Xcode AppleEnableSwipeNavigateWithScrolls -bool NO

Source: [https://stackoverflow.com/questions/20024231/prevent-disable-xcode-scroll-navigation]

lowlands42
  • 51
  • 1
  • 2
  • wow, thanks. Xcode is so crappy that it hangs constantly if the back swipe is on. Did I mention I hate xcode? thanks. – Duck Mar 26 '16 at 15:34
  • I can't count how many years I suffered from this bug. My finger just moves 1 mm on the Magic Mouse and puff, Xcode starts swiping, and my Interface Designer or SwiftUI Previews is gone, has to be reloaded. You saved countless hours of waiting for me, sir! – gklka Jun 24 '22 at 19:34