Search code examples
macosterminalzshkeyboard-shortcuts

How to find a Mac terminal command to turn off a default keyboard shortcut


I'm trying to find the equivalent terminal command for Mac, used to turn off these specific keyboard settings(and the checkbox at the bottom):

Mac system keyboard shortcuts to turn off previous input source

It's the control + space hotkey combination, that is also used by vscode to trigger suggestions

How can one find the correct command for turning this setting off? I found another post, but it mentions keyboard shortcuts for apps, not the system shortcuts


Solution

  • With the comment of Philippe:

    The setting is in the result of command [defaults read com.apple.symbolichotkeys] key 60 atribute enabled = 1. You need to set it to 0.

    I managed to find the following command that sets this to disabled:

    plutil -replace AppleSymbolicHotKeys.60.enabled -bool NO ~/Library/Preferences/com.apple.symbolichotkeys.plist
    

    And then using this command(or restarting the machine), we can make sure it's applied

    /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
    

    Thanks for all the help.