Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Keyboard Layout Optimized For LaTeX Writing


  • Please log in to reply
7 replies to this topic
mert.nuhoglu
  • Members
  • 7 posts
  • Last active: Jun 21 2010 04:25 PM
  • Joined: 21 Apr 2007
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 <a href="http://www.autohotkey.com/">AutoHotkey</a>.
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.
Here are the scripts:

For English Qwert Keyboard:

Space & q::Send {``}{Space}
Space & w::Send {`@}
Space & e::Send {`<}
Space & r::Send {`[}
Space & t::Send {`$}
Space & y::Send {`'}
Space & u::Send {`_}
Space & i::Send {`]}
Space & o::Send {`>}
Space & p::Send {`!}
Space & a::Send {`%}
Space & s::Send {`(}
Space & d::Send {`{}
Space & f::Send {`=}
Space & g::Send {`*}
Space & h::Send {`+}
Space & j::Send {`\}
Space & k::Send {`}}
Space & l::Send {`)}
Space & `;::Send {`?}
Space & z::Send {`.}
Space & x::Send {`/}
Space & c::Send {`^}{Space}
Space & v::Send {`&}
Space & b::Send {`#}
Space & n::Send {`"}
Space & m::Send {`-}
Space & ,::Send {`|}
Space & .::Send {`~}{Space}
Space & /::Send {`.}

Space::Send {Space}

^Esc::ExitApp

For Turkish F-Keyboard:

Space & f::Send {``}{Space}
Space & g::Send {`@}
Space & ğ::Send {`<}
Space & ı::Send {`[}
Space & o::Send {`$}
Space & d::Send {`'}
Space & r::Send {`_}
Space & n::Send {`]}
Space & h::Send {`>}
Space & p::Send {`!}
Space & q::Send {`.}
Space & w::Send {`.}
Space & x::Send {`.}
Space & u::Send {`%}
Space & i::Send {`(}
Space & e::Send {`{}
Space & a::Send {`=}
Space & ü::Send {`*}
Space & t::Send {`+}
Space & k::Send {`\}
Space & m::Send {`}}
Space & l::Send {`)}
Space & y::Send {`?}
Space & ş::Send {`.}
Space & <::Send {`.}
Space & j::Send {`.}
Space & ö::Send {`/}
Space & v::Send {`^}{Space}
Space & c::Send {`&}
Space & ç::Send {`#}
Space & z::Send {`"}
Space & s::Send {`-}
Space & b::Send {`|}
Space & .::Send {`~}{Space}
Space & ,::Send {`.}

Space::Send {Space}

^Esc::ExitApp

I will put the updated versions of the scripts here:
Turkish F Keyboard
English Q Keyboard

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006
You can optimize your code a little by adding following two lines to the top:

SendMode Input
#UseHook


mert.nuhoglu
  • Members
  • 7 posts
  • Last active: Jun 21 2010 04:25 PM
  • Joined: 21 Apr 2007
Thanks for the suggestion. Could you explain what is the benefit in adding these two lines?

automaticman
  • Members
  • 658 posts
  • Last active: Nov 20 2012 06:10 PM
  • Joined: 27 Oct 2006
It is written in the ahk-help, but if you could not feel any differences yourself after adding those two lines, you could just delete them again. I could feel at least on my laptop a speed improvement. You can write faster without having recognition problems.

sesame
  • Guests
  • Last active:
  • Joined: --
Thanks! I had a ache on right wrist for typing tex a long time.

I looked for a enhance keyboard layout to improve my health.

Could you give a short introdution for install?

Hope your reply earnestly.

cirosantilli
  • Guests
  • Last active:
  • Joined: --
I did not know you could scape with space... this is great.

Why not send ( and ) together with

Space & l::Send {`(}{`)}{Left}

This puts you right inside them.

Specially useful with Capslock arrow nagivation:

http://lifehacker.co... ... navigation

cirosantilli
  • Guests
  • Last active:
  • Joined: --
I did not know you could scape with space... this is great.

Why not send ( and ) together with

Space & l::Send {`(}{`)}{Left}

This puts you right inside them.

Specially useful with Capslock arrow nagivation:

http://lifehacker.co... ... navigation

cirosantilli
  • Guests
  • Last active:
  • Joined: --
This prevents {Space} from activation my hotstrings... is there a workaround?