Wednesday, 18 April 2012

Tutorial: Natural scrolling only with Trackpad


php:
code:
 
apple chose force toggle of scrolling direction pointing devices whenever want toggle 1 of them in lion preferences. many users including myself adopted new default natural scrolling use trackpad can't used when scroll mouse , rather have old, non-inverted scrolling when it's case.

far, way achieve without going system preferences every time switch between trackpad , mouse install scroll reverser, free app sits in menu bar , offers more settings lion's default preferences. unfortunately, scroll reverser buggy , temporarily switches between scrolling orientations no apparent reason. found more annoying manually switching direction in system preferences.

since there still no perfect solution achieve natural scrolling trackpad without going system preferences every time, decided make own using applescript , marcopolo.

here's tutorial on how it.

natural scrolling trackpad


step 1 : enabling access assistive devices


let applescripts toggle system preferences settings, first need enable access assistive devices.

so, go in system preferences -> universal access , check "enable access assistive devices".
[​img]
step 2 : creating applescripts


need save 2 applescripts: 1 enable natural scrolling, other disable it.

open applescript editor application located in /applications/utilities. paste following code in it:
code:
tell application "system preferences"  	activate  	set current pane pane "com.apple.preference.trackpad"  end tell    tell application "system events"  	tell application process "system preferences"  		tell tab group 1 of window "trackpad"  			click radio button 2  			if value of checkbox 1 1  				click checkbox 1  			end if  		end tell  	end tell  end tell    tell application "system preferences"  	quit  end tell
click file->save as. name file "mouseplugged" , save anywhere won't accidentally move/delete it. chose library folder.
[​img]
at point, if did correctly, click "run" button in applescript editor , should automatically open system preferences, disable natural scrolling , close system preferences in fraction of second.

need create applescript code:
code:
tell application "system preferences"  	activate  	set current pane pane "com.apple.preference.trackpad"  end tell    tell application "system events"  	tell application process "system preferences"  		tell tab group 1 of window "trackpad"  			click radio button 2  			if value of checkbox 1 0  				click checkbox 1  			end if  		end tell  	end tell  end tell    tell application "system preferences"  	quit  end tell
save 1 "mouseunplugged" @ same location last script. if run it, should automatically enable natural scrolling.


step 3 : installing , configuring marcopolo


marcopolo freeware allow detect whenever mouse plugged or unplugged in order automatically run applescripts made when necessary.

download marcopolo official website scrolling , clicking on "marcopolo-2.5.dmg (universal binary)".
install dragging in /applications folder.
open , icon should appear in menu bar. click on , select "preferences...".

[​img]

go in "contexts" tab , add 2 contexts named "mouse plugged" , "mouse unplugged" respectively. delete default "automatic" context.

[​img]

go in "rules" tab , add usb rule. select "apple internal keyboard / trackpad [apple, inc.]", choose context "mouse unplugged", set confidence @ 100% , click ok.

next, add rule (either usb or bluetooth depending on mouse) presence of mouse. make sure mouse connected when step , select in list, choose context "mouse plugged", set confidence @ 100% , click ok. if have multiple mice (home, work, etc.), add separate rules each.
[​img]
go in "actions" tab , add open action. prompt file, go select "mouseplugged" applescript created in step 2 , click open. choose context "mouse plugged".

create second open action "mouseunplugged" applescript context "mouse unplugged".
[​img]
you can close marcopolo preferences. @ point, natural scrolling should turned off every time plug mouse , turned on every time unplug it.

step 4 : launching marcopolo on startup , hiding menu bar icon

go system preferences -> users , groups. click on "login items" tab , click on "+" sign. locate marcopolo in /applications folder click add. close system preferences.

if hide marcopolo icon menu bar, click on , on "preferences..." , check "hide status bar" checkbox in "general" tab. marcopolo permanently hidden unless go open in /applications folder.

, that's it! marcopolo 100% transparent , launch @ startup. natural scrolling toggle automatically every time plug/unplug mouse without requiring manual toggling.
 

seems lot of work when go system preferences , check/uncheck box in trackpad settings.
 


Forums Macs macOS Older OS X Versions Mac OS X Lion (10.7)


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment