Saturday, April 21, 2007

Keyboard for LaTeX

I prepared a new keyboard layout that is partially optimized for LaTeX editing. I made some statistical analysis on sample LaTeX documents. And then put the most frequent keys such that they are easy to type.

The rules laying out the keys are these:
1. The load on both hands should be balanced.
2. Mostly used characters should be arranged according to these rules in the order of priority:
a) Index finger > Middle finger > Ring finger
b) Middle row of the keyboard > Upper row > Lower row
c) Little finger

So I determined the following layout for the symbols that are widely used in LaTeX documents:

` @ < [ = ' _ ] > ! . . .
% $ ( { * + \ } ) ? .
. . / ^ & # " - | ~ .

The above layout is in the order of the keys in a standard keyboard like:

q w e r t y u i o p . . .
a s d f g h j k l ; .
. z x c v b n m , . /

To make the LaTeX keyboard effective, the user presses any key in combination with Space key. Space key is under the thumb finger. So it is the easiest key to press very frequently. To do this I wrote a script in AutoHotkey.
Note that to make the layout easy to remember, I made a convention for parantheses characters "< [ ( {". The opening parantheses are all put in the left side and their counter pairs are put in the same key location in the right side.
You can get the script file from the following links:
English Q-Keyboard
Turkish F-Keyboard
To exit the script, press Ctrl-Esc.