Saturday, November 17, 2007

Easy Keyboard Layout

The QWERTY keyboard layout (the one that you probably use every day) was made mainly to avoid stuck pairs of typebars in typewriters. Of course this is not a problem with modern keyboards and that makes the QWERTY layout a bit inefficient (at least for the right handed people). For example many words can be typed by using only the left hand while there are fewer that can be typed with the right hand only. The best case would be to have both hands type alternating keystrokes so that you can move one hand in place while you are striking a key with the other.

There are other keyboard layouts too which try to address some of these problems. One the most famous is the Dvorak keyboard which is probably better than QWERTY.

Anyway, to cut a long story sort, I wrote, before one or two days, a program in Lua that would try to make an optimized layout based on three criteria:
  1. Letters that appear next to each other often in English text should be far from each other on the keyboard so that the two hands can press them alternatively.
  2. Characters that appear often with a distance of two characters (like T and E in the word "the") should be close to each other so that that each hand moves as less as it is possible during the alternations.
  3. The most used character should be close to either the third or the seventh key of the second row (where the D and the J lie on QWERTY keyboards) because that's where I put my middle fingers. :-P
I run this program with LuaJIT (because I really needed more speed) and it came up with this layout:


Today I bought a keyboard (the cheapest I could find) and started switching the positions of the keys to turn it into this:
(the photo is outdated. The P and B should be switched)
I still haven't tested it because I bought a PS/2 keyboard while my laptop hasn't got a PS/2 port. So I am waiting to test it to a friend's PC tomorrow.

Of course to use this keyboard you will need to notify the system of the different letter positions. I made a file that can be loaded with xmodmap in Linux to use this keyboard. I will also do the same with Microsoft Keyboard Layout Creator so that Windows will be able to recognize my layout.

I won't upload the program's code yet because I am constantly changing it. If you really want it then just leave a comment asking for it and I will upload it. You might also want to try Kiwi: a program written in C that will create custom keyboard layouts. It looks like a great program but I haven't actually tested it yet.

Amazing fact: Just by changing the position of the letters on a keyboard you can create more than 403,291,461,126,605,635,584,000,000 different layouts.

No comments:

Post a Comment

Popular Posts