Call defaults write directly.
Use pckeyboardhack to change capslock