How to disable default Mission Control shortcuts in terminal

keyboardmission-control

I never use the keyboard shortcuts for moving spaces in mission control, and they happen to conflict with some other settings I have. I have an automated script that sets up my Mac and I'd like to disable all the defaults keybindings for Mission Control programmatically.

Best Answer

I was able to figure this out. Here is what I did:

Step 1

Generate a file with your current default settings:

defaults read com.apple.symbolichotkeys.plist AppleSymbolicHotKeys > file_a

Step 2

Manually change the settings you want in System Preferences > Keyboard > Shortcuts

Step 3

Generate a new comparison file from settings after making your change:

defaults read com.apple.symbolichotkeys.plist AppleSymbolicHotKeys > file_b

Step 4

Diff compare the two files:

diff file_a file_b

Step 5

Disable only the keys that appeared in the diff, example:

defaults write com.apple.symbolichotkeys.plist AppleSymbolicHotKeys -dict-add 82 "
  <dict>
    <key>enabled</key><false/>
    <key>value</key><dict>
      <key>type</key><string>standard</string>
      <key>parameters</key>
      <array>
        <integer>65535</integer>
        <integer>124</integer>
        <integer>8781824</integer>
      </array>
    </dict>
  </dict>
"