I would like to have the defaults terminal command to set the keyboard shortcuts for selecting the next or previous input sources for the keyboard. They can be changed graphically via system preferences -> keyboard -> shortcuts -> input sources, as shown below:

System Preferences dialog for changing keyboard source input shortcuts

I began following the instructions from this blog post, and found that the settings I want are stored in a deeply nested structure in the defaults:

"com.apple.symbolichotkeys" = {
    AppleSymbolicHotKeys = {
        60 = {
            enabled = 1;
            value = {
                parameters = (
                    65535,
                    103,
                    8650752
                );

I think I have to set the "enabled" and "parameters" values. I was hoping that defaults would simply take a space-separated path to the value to set, but the following does not work:

defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys 60 value parameters -array 65535 111 8650752

The error message is:

defaults[15325:960790] Unexpected argument value; leaving defaults unchanged.

How do I correctly set these values from the terminal?

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.