Programmer’s Dvorak on Mac OS X 10.10 & German umlauts

If you are a real fan of the programmer’s Dvorak keyboard layout that is part of X11 on Debian, you might want to use this keyboard layout on a mac, too. Unfortunately, OS X 10.10 (and probably older versions) comes with the standard Dvorak layout only, which can be quite annoying when combined with vim, since the placement of ‘:’ differs.

Thanks to google, a solution is described in detail here, and the layout can be downloaded here.

Although the layout contains a German sharp-s (ß) in the right place, it doesn’t have umlauts available. Therefore, we need to patch the layout. I assume that you have installed the layout accordingly, then you will find the layout here:

'/Library/Keyboard Layouts/Programmer Dvorak.bundle/Contents/Resources/Programmer Dvorak.layout'

This file needs to be patched either by hand using any editor you like or with the patch command using umlauts.diff.

The easiest way to do so, is to copy the following rather long line to the terminal after you installed the aforementioned package (your account has to be in the admin group, and you should use a sudo bash shell).

curl https://immanuel-albrecht.de/wp-content/uploads/2014/12/umlauts.diff_.txt | patch '/Library/Keyboard Layouts/Programmer Dvorak.bundle/Contents/Resources/Programmer Dvorak.layout'

After you applied the patch, reboot and enjoy the umlauts using the alt-key and the respective base letter!

Update

After plugging in a Standard-German-PC-Keyboard with numpad via USB, I noticed that the numpad keys seemed to be strange (and the numbers were in telephone-order instead of calculator-order). So here is another patch that will change the behaviour of the numpad keys to something more “standard”.

You can download the numpad patch here, or just copy the following to a terminal and reboot:

curl https://immanuel-albrecht.de/wp-content/uploads/2014/12/USB_PC_Numpad-Patch.diff_.txt | patch '/Library/Keyboard Layouts/Programmer Dvorak.bundle/Contents/Resources/Programmer Dvorak.layout'