Thursday, 5 April 2018

macos - Change keyboard layout to DVORAK from command line on Mac


How can I change the keyboard layout to Dvorak on a mac, using the terminal? What is the defaults write setting for the keyboard layout?



Answer



This snippet did the trick for me. Note that I use Quicksilver to launch apps, so I remapped the keyboard shortcut for "switch input menu" from Cmd+Space to Option+Cmd+S.


osascript -e 'tell application "System Events"' \
-e 'keystroke "s" using {command down, option down}' \
-e 'end tell'

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...