I want to toggle System Preferences Keyboard/Keyboard Tab “Use all F1, F2, as standard function keys” checkbox. This determines if key F1 controls assigned shortcut brightness etc or is standard F1, depending on keyboard.
AFAIK this is controlled by ~/Library/Preferences/.GlobalPreferences.plist value “com.apple.keyboard.fnState” in Mountain Lion.
So I have:
--TOGGLE ON
do shell script "defaults write .GlobalPreferences com.apple.keyboard.fnState -bool yes"
This duly modifies plist but I don’t see change in System Prefs (or behaviour) until I log out log in.
Any ideas? Thanks.