Поделиться через


John's Dvorak Keyboard Self Help Guide

You find yourself facing a seemingly broken logon screen.  Every character you type seems to come out as some other character.  Perhaps you know JohnL-S had something to do with configuring that system.  You type ASDF and it comes out AOEU.   What’s going on?

It was brought to my attention this morning that many of you cannot type on a Dvorak keyboard.   It’s OK – don’t feel bad.  You should not think any less of yourselves because of this.   I’m here to help.  Plus I want JoC to stop yelling at me.  So I bring you this handy dandy Dvorak Keyboard Self Help Guide.

Even though I have been programming computers since I was about 12, I was a late touch typist (like 20-something).  I could not kick the bad habits that I had developed as a hunt-and-peck typist.   Then I stumbled upon the Dvorak layout in a copy of Mavis Beacon Teaches Touch Typing.  Because it was completely different, it forced me to actually stop looking at the keyboard, and in about 6 weeks I had surpassed my previous two fingered typing speed.   It was tough, but I got some encouragement from Randy Cassingham of This is True fame, who played a part in getting the Dvorak drivers built into Windows in the first place.

OK then.  Now, even though I type on a Dvorak keyboard layout, I do it on standard QWERTY keyboards.   It’s hard to find Dvorak keyboards, and the stickers are too expensive.  Plus, you’re not supposed to be looking at the keyboard as you type anyway.  If you know what you want to type, but you just don’t know what keys to press, the following command line program can help.  Just pass it the string you are trying to type and it will spit out the exact QWERTY keys to press to get what you want.

 using System;

namespace DvorakOnQwerty
{
  class Program
  {
    static String dvorak = " `1234567890[]',.pyfgcrl/=\\aoeuidhtns-;qjkxbmwvz~!@#$%^&*(){}\"<>PYFGCRL?+|AOEUIDHTNS_:QJKXBMWVZ";
    static String qwerty = " `1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%^&*(){}QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?";
        
    static void Main(string[] args)
    {
      String[] temp = Environment.CommandLine.Split(new char[] {' '}, 2);
      
      if (temp.Length == 2)
      {
        String cmdLine = temp[1];
                    
        for (int i = 0; i < cmdLine.Length; i++)
          Console.Write(qwerty[dvorak.IndexOf(cmdLine[i].ToString(), StringComparison.Ordinal)]);
      }
    }
  }
}

So if you type:

 > DvorakOnQwerty Dvorak Rules!
H.soav Ofpd;!

Then you would just type the encoded sequence of letters exactly as shown on a QWERTY keyboard, paying attention to case of course.  There’s also a good picture here so you can see what’s actually going on.  As you can see, the number keys are the same, which helps.

Here are some other things about the way I use Dvorak.  I always set up my machines with both the QWERTY and Dvorak drivers installed, and I set the keyboard shortcuts so that CTRL+SHIFT+1 switches to Dvorak and CTRL+SHIFT+2 switches to QWERTY.   Remember that since around Windows 2000 the decision was made to make the keyboard mapping input thread specific, so you have to change it for every process that you use.  That’s right.  For some reason it doesn’t change the keyboard for every program on the desktop.  I guess that’s a feature so that you and I can sit in front of a computer alternately wrestling the keyboard out of each others hand, whilst still being able to touch type at full speed.   This is rather nutty, and I don’t get it either, but there you go.  

I also set always set things up so that the language bar icon appears on the Taskbar.   Click on the icon and select the input keyboard layout you want, like so.

Last but not least, I make life easy on all you non-Dvorak users and don’t change the default user keyboard layout, so the logon desktop is in the QWERTY layout.  BUT, occasionally Windows Terminal Services loses its mind and switches this user/desktop to Dvorak at random times.  I don’t know why this happens.  It’s could be a bug or it could be some strange configuration problem.  I’ve also seen Internet Explorer switch keyboard layouts at random times too.  But that’s OK, because now you have the handy-dandy program above, a helpful link and some other stuff, so you can rescue yourself.

I’m really happy that I learned Dvorak, but it seems to get me no end of grief wherever I go, so I leave you with this final request.   Nd lgid ks H.soav f;do;!