Programmer Dvorak Keyboard Layout

Introduction

As a computer professional, you've probably done some typing over the years. A lot of typing. And your hands don't always love you for it. If you are concerned about catching the carpal tunnel syndrome, you should be looking into Dvorak keyboards. They have been designed to minimize the finger movement for the most common phrases you type. And when your finger move less, they get less strain too.

Dvorak keyboards are mostly known for their ability to speed up typing. Along with this comes the usual crowd of naysayers that state that it hasn't been proved that Dvorak actually is faster that Qwerty. However, no-one has ever produced evidence that it is slower either. And they're really missing the point, too. It isn't about being faster, it is about being easier. Dvorak keyboards are easier because they have been designed so that the most common phrases are located nearer the base position of your fingers.

I guess that speed and learning time is important if you are a corporation that have to pay to train typists, but I don't emphasize those factors. In my case, the slowest component is still the one sitting in front of the keyboard.

Why creating a new layout?

An ANSI Dvorak layout already exists, and your operating system probably comes with this installed. However, this layout has some serious problems when writing source code. The characters are in traditional Dvorak layout all right, but the symbols are put in the same hopeless locations as in the Qwerty layout!

Programmer Dvorak is a "sub"-layout which makes it easier to write source code in C, C#, Java, Pascal, Lisp, CSS, XML and alikes. It was generated through reflection of the most common constructs in these languages and the rules set forward by the August Dvorak in his research, then verified by scanning through thousands of source code lines ensuring that a good fit was found. The result can be seen below.

I have used the Dvorak layout as a starting point, since most programming languages use English words. Also, English is often the lingua franca for comments and documentation. None of the letter keys has been moved from the original, making it suitable for typing English prose as well.

How do I start to use Programmer Dvorak on my computer?

You can download a driver from this site. When you install these packages, Programmer Dvorak will not be made your primary keyboard. You can read the instructions for activating on Windows, on Linux, or on Mac OS X.

To rebuild the Windows driver, you will need the Windows DDK from Microsoft (really just kbd.h and a compiler). The X.org driver consists of a text file, so the source may be used as a driver for unsupported distributions.

How much computer resources does this program need?

This is not yet another crapware program with an integrated Explorer search bar like the ones you can too easily find on download sites. Rather, it integrates into the operating system's way of handling keyboard layouts and uses no additional CPU or memory. The disk cost is negligable.

Any tips for learning the layout?

I used the program "Mavis Beacon Teaches Typing". Version 5 had support for Dvorak, but it has unfortunately been dropped from recent versions. However, the GNU project distributes a free program called GNU Typist which includes lessions for Dvorak. There are also free online tutorials such as Denis Kniazhev's typing tutorial, which is an adaption of A Basic Course in Dvorak.

If you are somewhat self-trained on the keyboard, chances are that you are not using proper touch-typing. I highly recommend that you start doing it "by the book" when learning a new layout, and also that you get a more ergonomic keyboard.

Personally, I retained the ability to type Qwerty using the old fingering on a regular keyboard and type Dvorak with a touch technique on an ergonomic keyboard. Since they were sufficiently different, there was no cognitive conflict. You don't necessarily forget your mother tongue when learning a new language, although both need some practice to not disappear into oblivion! Lately, my Qwerty typing has become slower since I haven't used it in quite a while.

The images below can be printed out on adhesive paper (such as Avery 5265 (U.S. Letter) or L7167 (A4)) and stuck on a keyboard. Check if your local supplier carry them. I used a standard Keytronic as model for the metrics and have found that most others will fit, too. Hooleon sells a kit which can be used to print custom keyboard layouts, and Royal Galaxy even has preprinted stickers!

Keys that are typed with Ctrl+Alt/AltGr are either on the right or in the center of they stickers in the images, depending on whether the right side is used by a shift state of an alternative layout.

Where are the numbers?

Note that the numbers are placed in an odd-even sequence, as in the original Dvorak layout. Since symbols are used much more in code than numbers (you aren't hardcoding those constants are you?), they are also in a shift position. The French keyboard layout which also has extra characters to take into considerations does this too. Most keyboards provide the numerical keypad for entry of longer numbers such as phone numbers or SSNs. On laptops those are even amongst the main keys, accessible by a hardware Fn modifier! However, in this layout the numbers are affected by the CAPS LOCK, in order to type in series such as hexadecimal numbers, since you would seldom use it to enter a list of symbols anyway.

On the numpad, the digits are increasing downwards to the right, as is common on phones instead of the upwards to the right which is the standard for calculators. I haven't found any good references to studies that show that it is more effective, only it being mentioned briefly in the NY Times obituary of John Karlin and on a question site. However, practically everyone has a cell-phone or uses an ATM, whereas calculators are becoming rarer and rarer. Also, it is (a lot) easier to change the keyboard layout than reprogramming your local ATM.

Traditionally, the cursor and digit keys were in shift positions since neither have a natural capital as the alphabetic characters have. However since the introduction of the enhanced keyboard in 1986, there has been an additional set of "gray" cursor keys to the left of the numpad. Even on laptops were the space is tight, there are still separate cursor keys.

I have therefore decoupled the Shift and NumLock into two independent modifiers, "Swiss-German" style (SGNum), and made the numeric keypad more friendly to hexa-decimal digits by having the letters A-F available as the shift version of the regular letters. Similar to the numbers, they are increasing downwards to the right. This puts D, E and F which tends to occur more often since they are also decorators on floating point numbers in programming languages, on the home row.

Although capital letters are more customary (probably since the decimal digits are fullsize too), I have chosen small letters to bring more visual contrast to the extra six digits. In addition, I have added some symbols that are commonly used in spreadsheets, so that many formulas can now be added using the numeric keypad alone.

Some people still like to use the cursor keys on the numpad; the gray keys just being cumbersome since they introduce a greater distance on the keyboard. It is admittedly somewhat harder to toggle between data entry and navigating, since the numpad must be "unlocked" instead of just releasing the modifier. However, I think that the benefits overshadows the costs since one tends to type several keys in each mode before switching between them.

Unfortunately, Windows handle the numpad by doing a hard-coded translation of arrow keys to digits if NumLock is on, thus making it impossible to reassign the digits without also switching up and down(!). This has been worked around by assigning the keys directly to the digits, disabling the cursor keys on the numpad altogether, making NumLock even less usable than Scroll Lock and forcing the "gray" cursor keys to be used instead. I am looking for ways to reenable the cursor keys, but so far it looks grim. If you are entering numbers in a spreadsheet, you should consider using Tab and Enter to move left and down, respectively. On Linux/X.org, the cursor keys still work as intended.

Be also aware that the functionality of pressing Alt+ASCII code to generate a character is hard-coded to the scancodes of the keys, so they follow the old layout of the numpad.

While we're at it, I can also recommend using a left-handed mouse, as it is easier to reach, not having to move the hand over the numpad as well. If you are right-handed, it also gives the benefits of writing hand-notes while using the mouse!

Why aren't the brackets on the same finger?

The parenthesis "(" and ")" are on the left and right index finger, respectively. But the brackets "[" and "]" are on the little finger and the ring finger. The reason is that the right bracket "]" is very often followed by either a plus "+" or a minus "-". If it had been on the little finger, these moves would be very awkward. Conversely, if the left bracket had been on the ring finger, it would split up the braces "{" and "}" which commonly occur in pairs. Note also that with the current placement, the pair of empty brackets are typed from the outside finger and inwards.

What about other languages than English?

Other languages (such as French, Spanish and German for instance) not so well. Not only do they have extra letters that must be shoe-horned onto the keyboard (taking precious space) but they also have different character frequency characteristics than English, meaning that other letters should be at the prominent places. I have included dead keys and even some accented characters so that you can type a foreign word now and then, but to get the same gain for a different language an entirely new analysis should be performed.

For instance, if you hold down Ctrl and Alt (AltGr on Linux) when typing the apostrof (') then you'll get the acute dead key. The next vowel you type will be accented using the acute accent. Same goes for the backquote and the caret.

Due to the number of combinations, I don't think it is feasible to cram all kind of accents into modifier combinations and still have a layout that would be convenient for daily use. However, most European languages with a Latin script are accessible through compose combinations instead (see below).

What is the square symbol in the lower left corner?

European-style keyboards have an extra key, for a total of 102/105 instead of 101/104, to accomodate the need for more symbols. This key is located in the lower left corner and is usually less-than/greater-than. Programmer Dvorak does not use this extra key in itself in order to be usable on all keyboards, but on Windows it acts like a Compose key, allowing you to type an accented character using Compose and then two other letters. For instance Compose+'+e gives é. This is the same behaviour as the Ctrl key has in Microsoft Word and Messenger.

If you have a keyboard with 102/105 keys, you is probably because you are currently located in a country where accented characters are used, so you may want to be able to enter them, even if you use a main layout designed for 101/104 keys. As a bonus, it is close to the other modifiers and where the original Compose key used to be.

On Linux, you can use the compose:102 option to activate this behaviour, even for other keymaps!

At first glance, it seems more cumbersome to type three keys to get an accented character (using Compose) than two with a modifier (AltGr and a dead key). However, typing a key while simultaneously holding down a modifier can take up to three times as long due to hands getting out of position, so it is not necessarily given that a Compose sequence actually takes longer. It can take some time to get used to it if you come from a layout that uses AltGr, though.

Additional features

If you press Ctrl-Alt-G or Ctrl-Alt-M, the layout will invoke greek or math mode, respectively. The next character will then be from the selected alphabet. This can be handy if you need to write a quick equation in an e-mail or instant message. Only available in Windows, though.

What have changed in the revision?

After a decade of use, I have made some slight changes to the layout. The numpad is changed for the reason listed above. Diaeresis and acute accent are now dead keys and are moved left on the keyboard, whereas backquote and caret have been given their keys on the right side instead. This change was done since the latter keys are more used in programming contexts and also because I wanted to free up a key so that the layout would be suitable for 104-keys keyboards.

Originally, I created the layout for a European-style keyboard since I intended it for my personal use, and that was what I had. It seemed a waste not to use all the keys. I have found that I don't use the accented keys enough to have them as their own keys instead of a more general Compose key. Additionally, more keyboards can now be used for using the layout.

With the introduction of the Compose key, I have removed the AltGr key. The right Alt key is now just a regular Alt, like the left one. On Windows, the same functionality can be achieved by pressing Ctrl+Alt, and on Linux one can add it back with the lv3:ralt_switch option. I wanted to be able to use accelerators from the left side of the keyboard (such as Alt+F4) without stretching my fingers.

I could have assigned the otherwise useless Application key as the mode switcher, but I use it as the host key for virtual machines. (SysRq seems to be unavailable for that purpose as it is used to break into the kernel debugger). Alas, some new laptop models don't even have an Application key.

The documentation gives hints that the layout identifiers for a locale should all be in sequence. Ideally, this should be done at the time of installation so that no existing layouts created later that yours are overwritten, but it would require a more sophisticated installer.

On Vista, I ran out of luck and the classic Programmer Dvorak layout now clashes with the layout called "US English Table for IBM Arabic 238_L". The original entry can be restored with this Registry script if the installed overwrote it. Note that you should switch to another familiar layout before doing this! The new version fixes this problem by choosing an identifier with a lot less chance of conflict.

Installation scripts for Linux have been greatly improved. They can either be run directly from the command-line, or called from within an installer package. I won't be making packages for any specific distributions though, due to the number of variations and changing popularity amongst them.

What about making further changes to the layout?

I am always open to feedback about how the layout work, and open to good ideas. Keep in mind that a keyboard is a very constrained space and that any change necessarily will be a trade-off, though. Since training to use a layout proficiently takes a lot of work, I am also very reluctant to change the layout.

You can however roll your own variant to suit whatever desires, but you can not call the resulting keyboard layout "Programmer Dvorak", even when prefixed by an adjective. This is to ensure that the brand always designates the official layout specified here. Other than that the license is very liberal. The license covers both the ATM-style and the calculator-style layout of the numpad.

If you create a derivative work, then please put in a proper copyright notice. Also note that you should change the name and IDs in the code so that there is not a conflict with the original.

I won't host keyboard layouts that I haven't written myself, but if anyone creates an implementation of the Programmer Dvorak variant, I can link to it.

What about different keyboard types?

Programmer Dvorak is constructed to be used on a run-of-the-mill keyboard. I am aware of curved keyboards that have a symmetric layout of six keys on each side of the number row (unlike "flat" keyboards which (usually) have seven on the left side).

Kinesis keyboards unfortunately rocade the entire upper row one key. This may not matter much if the layout is numbers in ANSI order, but it causes the wrong finger assignment in the Programmer Dvorak layout. A Registry script to reorder the scancodes into the right position (such that it is '6' and not '5' that is above the 'T' in the right-most key on the left side of the upper row) is needed.

The Maltron just moves the left-most key, and should not be a problem.

What about other systems?

Unfortunately, I don't plan to create drivers for any other than the major operating environments (Windows, Linux and MacOS X) due to time constraints. In particular, retired systems like Windows 9x, OS/2 and MacOS (version 9 or earlier) will not be supported.

Not for the mobile blockbusters, Android and iOS?

A handheld unit with touch-screen is typically meant to be operated using one or to fingers, whereas the Dvorak layout is specifically designed to be operated using both hands, heavily relying on hand and finger alternation. Therefore, I reckon that it will actually be less efficient with these input methods.

If you have used a cell phone with a T9-capable keypad, then I think that MessagEase is the best successor on a smart-phone. It follows some of the same principles as the Dvorak layout — most frequent characters are easiest accessible, trying to minimize hand movement — and it doesn't even need a dictionary!

That being said, with the advent of tablets, hooking these units up to a Bluetooth keyboard such as the Logitech Fold-up makes it possible to even do some productive work while on the road, so I've started the work to make layout drivers for them too.

How do I get in touch with you?

Send an email to programmer.dvorak@gmail.com. Please don't use this email address for any other purposes than direct communication, i.e. do not use it or any other you found on this site as "author identification" of the software. Use the URL of this page instead.

What tools did you use to build the Windows layout?

To extract the files from the Support Tools installer, either run:

WindowsXP-KB838079-SupportTools-ENU.exe /C /T:%TEMP%
or use a tool such as 7-zip to unpack it directly. You can then open support.cab in Explorer and extract cabarc.exe.

The 1830_usa_ddk.iso image can be opened with a tool such as ImDisk.

Downloads

Binaries:
kbddvp-1_2_5-i386.exe (72 KiB) Windows 2K/XP/2k3/Vista/7/8, both 32- and 64-bit (updated: 2014-11-01)
MD5sum: d28e05f8d1c99d42b8f8f0d5e8e8e9f4
kbddvp-1_2_5.zap (1 KiB) Windows Zero Administration Package (for deploying through Active Directory group policies)
ProgrammerDvorak-1_2b9.pkg.zip (12 KiB) Mac OS X 10.2–10.9 (updated: 2013-11-28)
MD5sum: db9d8397d6784ec6a461534816e839b5
Sources:
kbddvp-1_2_5-src-winnt.cab (18 KiB) WinNT/Win2K/WinXP/Win2k3/Vista/7/8
ProgrammerDvorak-1_2b9.src.zip (9 KiB) Mac OS X 10.2–10.9
kbddvp-1_2_1-src-linux.tgz (4 KiB) X.org (gzip-compressed tar)
Images:
dvp1.png (6 KiB) Primary layout
dvp1-numpad.png (6 KiB) Numpad layout
dvp1-numpad-atm.png (6 KiB) Numpad layout without cursor keys
dvp2.png (5 KiB) Secondary layout
us1.png (11 KiB) U.S. as primary layout
us2.png (5 KiB) U.S. as secondary layout
no1.png (11 KiB) Norwegian as primary layout
no2.png (5 KiB) Norwegian as secondary layout

The images are transparent so that you can combine a primary and a secondary layout by putting them on top of eachother.

  Please view the installation instruction to see how to activate the layout on Windows 8.

Other interesting and related links

Spam Archive Federal Trade Commission Spam Recycle Project