Someone told me that Unix is configurable to the point of collapse, so it's no surprise that there are a number of different ways to configure a Dvorak layout on Unix-based systems.

I log into Unix via Telnet, which uses my Mac or PC's system keymap, so I haven't tried most methods described here. I don't know what works best for a particular system, or how much you can pick and choose between methods. But for simplicity I have tried to organize methods into the following categories:

All of these methods lend themselves to Fast-Switching Aliases

Linux Console

Andrew Pimlott says that in Linux the keyboard mapping on the text consoles can be changed with the loadkeys command. Most Linux distributions offer to set this up during installations, and put a loadkeys command somewhere in the system startup files. You can switch later with:

   loadkeys /usr/lib/kbd/keytables/dvorak.map
   loadkeys /usr/lib/kbd/keytables/us.map

An e-mail from Ben Gertzfield gives a different path to the keytables directory, so I guess it can vary according to your Linux flavor. Ben also says you might need to ensure that the "kbd" package is installed.

XWindows XKB Extension

Andrew Pimlott and Roy Stogner both tell me that recent free XWindows distributions (XFree86 3.2 and above) support the XKB extension with Dvorak preinstalled. Try typing setxkbmap dvorak to switch the keyboard. If this works, setxkbmap us switches back.

If you want to change the default layout for XFree86, change the XF86Config file's XkbLayout line to read:

  XkbLayout "dvorak"

Andrew says XFree86 comes with an unpopular bracket and brace configuration (not even ANSI). You can change it by editing the /usr/lib/X11/xkb/symbols/dvorak file. Roy says his distribution, XFree86 3.3.3, locates the key symbols file in /usr/X11R6/lib/X11/xkb/symbols/dvorak instead.

Other Dvorak Programs

Craig Richmond helped me find an older program called Xdvorak, which is available as C source code (with a readme) here and in X11R5 directories all over the country.

SGI users can try this SGI Xdvorak (5K) by Curtis Bingham, which I "borrowed" from Dylan James McNamee. This GZipped tar file contains a version of xdvorak.c with a makefile for SGI systems.

Xmodmap Keymaps

Apparently, the most common Unix keymap facility is XWindows' xmodmap command, which can be given a "keysym" file that individually remaps each key. But of course there are variations according to taste and Unix flavor.

Andrew Pimlott submitted a universal xmodmap solution that automagically generates the correct keysym file for the system being used. Larry Pyeatt posted another solution that does the same thing at http://www.cs.colostate.edu/~pyeatt/keyboard.tgz. Larry says Andrew's solution is probably better except on the few systems that don't have perl installed.

Jeff Bigler has created XWindows Dvorak keysym files for both hands, left hand only, and right hand only.

I used a similar file quite successfully in AIXWindows, by placing the command xmodmap .dvorak (where .dvorak is my keysym file's name) in my .xinitrc file. This only affected child processes, not the process I ran it in, so my login window was always QWERTY. I selected passwords accordingly!

Using xmodmap is especially convenient because you can modify the keysym files easily. Don Reed's Xwindows Setup is handy because it is easy to switch keymaps. He also has a keysym file that places the bracket and brace characters more conveniently than ANSI Dvorak does.

Daniel Butler's hpdvorak.txt HP keysym file apparently won't work on some HP systems. Try the "universal" solutions described above instead. E-mail me if that doesn't work and we'll try another reader's solution.

Fast-Switching Aliases

Don Reed's xmodmap setup suggests that you create complementary aliases in your .profile file to make switching keymaps easy. This technique can be used with any remapping method. For example, the following lines set up aliases for the Linux loadkeys command:

   alias asdf "loadkeys /usr/lib/kbd/keytables/dvorak.map"
   alias aoeu "loadkeys /usr/lib/kbd/keytables/us.map"

With these aliases set up, you can switch keyboards just by typing the four letters under your left hand. The layout in use determines which alias is invoked!

Andrew Pimlott suggests that, instead of aliases, you could write little shell scripts that check for a $DISPLAY variable and choose between loadkeys and setxkbmap.

Back to Introducing the Dvorak Keyboard.

Last update: 1 July 2000
Original page established: 25 February 1996
Marcus Brooks:  HTML Home  Weblog