Skip to content

Instantly share code, notes, and snippets.

@amslezak
Created January 16, 2016 01:12
Show Gist options
  • Save amslezak/412183344dbad7364de2 to your computer and use it in GitHub Desktop.
Save amslezak/412183344dbad7364de2 to your computer and use it in GitHub Desktop.
Toggle function (fn) on keyboard with alfred workflow
# snagged from here: http://www.alfredforum.com/topic/1849-toggle-fn-key-behavior/
on alfred_script(q)
tell application "System Preferences"
reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
click checkbox 1 of tab group 1 of window 1
end tell
quit application "System Preferences"
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment