Skip to content

Instantly share code, notes, and snippets.

@talkingmoose
Last active December 12, 2021 07:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talkingmoose/861588c136f5946d6961e41c51f2cb93 to your computer and use it in GitHub Desktop.
Save talkingmoose/861588c136f5946d6961e41c51f2cb93 to your computer and use it in GitHub Desktop.
This example adds the Latin American keyboard as an input sourcce under System Preferences > Keyboard > Input Sources. Quit and reopen System Preferences if necessary to see the change.
#!/bin/zsh
# adds the additional input source to the list of input sources
/usr/bin/defaults write com.apple.HIToolbox AppleEnabledInputSources -array-add '<dict><key>InputSourceKind</key><string>Keyboard Layout</string><key>KeyboardLayout ID</key><integer>89</integer><key>KeyboardLayout Name</key><string>Latin American</string></dict>'
# enables the input menu in the menu bar
/usr/bin/defaults write com.apple.TextInputMenu visible -bool true
exit 0
@talkingmoose
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment