Skip to content

Instantly share code, notes, and snippets.

@milemeter
Created January 24, 2011 20:52
Show Gist options
  • Save milemeter/793921 to your computer and use it in GitHub Desktop.
Save milemeter/793921 to your computer and use it in GitHub Desktop.
a quick applescript to toggle doublecommand alt/option swapping when using/not using a external MS keyboard
#!/usr/bin/osascript
# keyflip.sh
# a quick applescript to toggle doublecommand alt/option swapping when using/not using a external MS
# keyboard
tell application "System Preferences"
activate
set current pane to pane "DoubleCommand"
end tell
tell application "System Events"
tell process "System Preferences"
tell window "DoubleCommand"
click checkbox "Command Key acts as Option Key" of list 1
click checkbox "Option Key acts as Command Key" of list 1
click button "Activate"
end tell
end tell
end tell
tell application "System Preferences"
quit
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment