These instructions are for a U.S. English version of macOS 10.13.0 (High Sierra). Instructions for other languages and versions of the operating systems may vary. In particular, installation on macOS 10.15 (Catalina) may require special instructions.
These steps must be performed from a user account with administrator access. By default, the main user of the computer has this capability.
Open Safari and download the layout driver package. Safari will put this file into the ~/Downloads
folder, unpack it and then start the installer.
Choose Continue to skip the introduction screen of the package installer.
Make sure that your main harddisk is selected as the target of the installation, and then click the Continue button.
Click on the Install button to start installation.
Enter your password to make a system modification, and then click on the OK button.
Click on the Close button to acknowledge a successful installation.
Alternatively you can do an automated, non-interactive installation of the layout using this command:
sudo installer -pkg "~/Downloads/Programmer Dvorak v1.2.pkg" -target /
In Mavericks or later, the layout cache must be rebuilt before new layouts are recognized. First you must remove the old cache:
sudo rm -f /System/Library/Caches/com.apple.IntlDataCache.le*
and then you must reboot the system to have the new cache built upon startup.
macOS 10.15 requires applications from outside of the Mac App Store to be notarized. This also applies to the installer, even if the main contents of the package is not executable.
You can try to execute this command sequence on a Terminal command line to manually
extract and copy the layout onto your system, assuming that the installation package
is downloaded to the ~/Downloads
folder (which is the default if you
click on the link on the web page). You will need to have administrative access to
your computer to perform these steps (they will ask you for the superuser password).
cat ~/Downloads/Programmer\ Dvorak\ v1.2.pkg/Contents/Archive.pax.gz |\
gunzip | ( cd / && sudo cpio --quiet -R root:admin -idm ./Library/Keyboard\ Layouts/Programmer\ Dvorak.bundle )
Click on the Apple menu in the upper, left corner of the screen.
Choose System Preferences... from the menu that appears.
Click on the Keyboard icon in the second row in the window that opens.
Select the Input Sources header.
Click the + button in the lower, left corner.
Select the English language at the top of the list on the left side.
Select the Programmer Dvorak layout at the top of the list on the right side.
Click the Add button in the lower, right corner.
Tick the Show Input menu in menubar checkbox at the bottom of the window.
Close the Keyboard window.
Click on the Input Menu icon (the little keyboard or flag) in the upper-right corner of the screen.
Select Programmer Dvorak from the list that is displayed.
These steps are taken from the article About keyboard layouts.
Click on the Apple menu in the upper, left corner of the screen.
Choose System Preferences... from the menu that appears.
Click on the Languages & Text icon in the window that opens.
Select the Input Sources header.
Tick the Programmer Dvorak checkbox in the list (you must scroll down to see it).
Tick the Show Input menu in menubar checkbox at the bottom of the window.
Close the Languages & Text window.
Click on the Input Menu icon (the little keyboard or flag) in the upper-right corner of the screen.
Select Programmer Dvorak from the list that is displayed.
To make the keyboard setting for the current user apply to the login window as well, run the following command in a Terminal window:
sudo cp ~/Library/Preferences/com.apple.HIToolbox.plist /Library/Preferences/
Also see the article Mac OS X: How to change the keyboard layout at the login window.
The user interface won't let you remove the old layout (such as US English). You can however use the PlistBuddy utility to remove the layout manually from the configuration files and replace it with another:
for file in ~/Library/Preferences/com.apple.HIToolbox.plist; do
for key in AppleCurrentKeyboardLayoutInputSourceID; do
/usr/libexec/PlistBuddy -c "delete :${key}" ${file}
/usr/libexec/PlistBuddy -c "add :${key} string 'com.apple.keyboardlayout.Programmer Dvorak'" ${file}
done
for key in AppleDefaultAsciiInputSource AppleCurrentAsciiInputSource AppleCurrentInputSource AppleEnabledInputSources AppleInputSourceHistory AppleSelectedInputSources; do
/usr/libexec/PlistBuddy -c "delete :${key}" ${file}
/usr/libexec/PlistBuddy -c "add :${key} array" ${file}
/usr/libexec/PlistBuddy -c "add :${key}:0 dict" ${file}
/usr/libexec/PlistBuddy -c "add :${key}:0:InputSourceKind string 'Keyboard Layout'" ${file}
/usr/libexec/PlistBuddy -c "add ':${key}:0:KeyboardLayout ID' integer 6454" ${file}
/usr/libexec/PlistBuddy -c "add ':${key}:0:KeyboardLayout Name' string 'Programmer Dvorak'" ${file}
done
done
Notice that these commands will remove all layouts! Run PlistBuddy with the command -c "print"
and then the filename, to see which settings that are current.
The Programmer Dvorak layout enables the use of the Compose key on computers with an ISO keyboard (also known as International or European keyboard) attached. If your keyboard is detected as an ANSI (also known as Domestic or U.S. keyboard), it will not be available as ANSI keyboards have only 10 keys between the Shift keys whereas ISO keyboards have 11.
A simple way of checking for this is to install the Programmer Dvorak layout and then type the dollar ($) key, located at the upper left corner, above the Tab key. If you do not get a dollar sign, then you must change the keyboard type:
Click on the Apple menu in the upper, left corner of the screen.
Choose System Preferences... from the menu that appears.
Click on the Keyboard icon in the window that opens.
Select the Keyboard header.
Click on the Change Keyboard Type... button.
If this button does not appear, you should delete the file
/Library/Preferences/com.apple.keyboardtype.plist
.
Next, if you have a USB keyboard, you should unplug/replug it,
otherwise you must restart your computer. Then, start the procedure over again.
Keyboards manufactured by Apple may have their type automatically detected so the button never appears. In that case, try to start the assistant manually by pasting this command into a Terminal window:
sudo open /System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardSetupAssistant
Click on the Continue button.
Press the key on the right of the left Shift key.
Select "ISO (European)" from the list.
Click the Done button.
If setting the keyboard type still results in the wrong layout, you may have an unknown keyboard. Please run the command listed below in a Terminal window and mail the resulting print-out to me.
defaults read /Library/Preferences/com.apple.keyboardtype "keyboardtype"
If you have MacOS X 10.6 Snow Leopard or earlier, you can also try the following commands:
python -c 'from Carbon import Evt; print "ADB Manager Device ID = ", Evt.LMGetKbdType ()'
python -c 'import gestalt; print "Gestalt Keyboard Type = ", gestalt.gestalt ("kbd ")'
osascript -e 'tell application "Finder" to get computer "kbd "'
You should first use the activation instruction to uncheck the layout so that it is removed from the Input Menu. If you also set it in the login window, you should copy the new settings after now selecting another layout.
When deactivated, a keyboard layout claims very little resources. If you however want to remove all traces of it from your system, start the Terminal utility application and then paste the following commands into the window:
sudo pkgutil --forget com.apple.keyboardlayout.Programmer\ Dvorak
sudo rm -rf /Library/Keyboard\ Layouts/Programmer\ Dvorak.bundle/
sudo rm -f /Library/Caches/com.apple.IntlDataCache*
sudo rm -f /System/Library/Caches/com.apple.IntlDataCache.le*
rm -f /private/var/folders/*/*/-Caches-/com.apple.IntlDataCache.le*
You will be asked for your password to continue. After performing these tasks, you should restart your system to regenerate the cache files.