I use a custom keyboard layout which is based on a layout named Dovrak International Extended by Arjen van Kol. My additions swap Control/Capslock keys and adds support for the Indian Rupee symbol ₹, among other things.

Installing on Linux

The keyboard layout exists as a distinct file named dvk_lin_osx (for historical reasons) in my file system. This file is normally copied to /usr/share/X11/xkb/symbols/ as dvk. Then it is enough to do

1setxkbmap dvk

to temporarily set the key layout.

However, to get this keyboard layout in the GUI keyboard settings, you need to additionally make entries to the file /usr/share/X11/xkb/rules/evdev.xml. Copy the evdev.xml file in my filesystem to that location. Note that the file could get over-written by subsequent system updates.

NOTE: Some guides say that the file evdev.lst also needs to be modified. But I don’t know if this is needed. It seemed to work for me without touching the evdev.lst file. (Or, maybe not. May need to try coping over the evdev.lst file as well to /usr/share/X11/xkb/rules/)

After this, best to reboot the computer and then open the GUI keyboard config settings and search for the English (United States) language dvorak layout in the GUI. As a bonus, the ‘Show Keyboard Layout’ option in the GUI will actually show/visualize this custom keyboard layout, so that serves as a quick visual check that everything is as it should be.

Installing on Mac OS

I used an app named Ukelele to create a .keylayout file. On every new Mac OS, this software needs to be installed. Then I import my custom .keylayout file and install it as a Mac keyboard layout. The swapping of Cmd/Capslock (Note, in Mac, we are not swapping Ctrl/Capslock) happens through the Mac keyboard settings.