Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An Ideal Keyboard Layout for Programming [closed]

People also ask

Which is better Dvorak or QWERTY?

Whereas QWERTY was designed so keyboards didn't jam, Dvorak was designed by taking a look at QWERTY and trying to come up with a faster and more efficient layout. People who prefer the Dvorak keyboard argue that it's more efficient, can increase typing speed, and even offers better ergonomics.

Should I switch Dvorak or Colemak?

Well, Colemak does provide some unique benefits over Workman and Dvorak. While all these layouts are more efficient and comfortable to use than QWERTY, Colemak keeps key functionality. With Colemak you are able to keep macros like Ctrl + C and Ctrl + V to copy and paste in the same place on your keyboard.

What are the 3 types of keyboard layout?

Changing the Layout of the Keys For languages using the Latin alphabet, there are three main key layouts: QWERTY, QWERTZ, and AZERTY. Several countries have created their own variations based on these keyboards. For example, the CSA (Canadian French) keyboard uses QWERTY, but with different keys, including , and .

Is Workman better than Dvorak?

Both Colemak and Dvorak have higher right pinky percentage at 11% (253,850 keystrokes), while Workman is only at 9% (207,696 keystrokes). On Workman, your right pinky finger just typed 46,155 less keystrokes than both Colemak and Dvorak… that's about 4 hours of work using ALL your fingers.


I still hold that typing speed is not the main factor in the time it takes for a project to be completed. If it is, there is a big problem (Weeks of coding saves us hours of planning).

Regarding your question I prefer using the standard layout as it means I don't have to spend the first 10 minutes looking stupid when presented with a standard keyboard layout.

Some of the replacements you have suggested, e.g. the top row with the special characters doesn't make a ounce of difference as the outside finger on the other hand should be moving to shift at the same time.

IMHO One thing that helps above chaining layouts is using only keyboard shortcuts. Vim and Emacs are recommended. It makes moving text around far faster.


I would approach your question in the following way. The task is to organise a keyboard in such way as to minimise key strokes and hand movement for given text.

Steps toward a possible solution. Make a program that:

  1. Takes a text file with source code. (The bigger the better and from various sources!)
  2. Counts the frequency of use of each symbol (its presence in the text).
  3. (optional) Based on step 2: The program generates key stroke count for each symbol plus how far the hand has to go from central position. As a result you will have a measure how effective your keyboard layout is.

Now manually or by writing a program Redefine your layout in the following way. Put most frequently used symbol in a central position closer to your strong hand. The second symbol goes to your weak hand in central position. The third symbol goes back to your strong hand...and so on. Then you gradually move from central position of the hands into more "distant" areas of the keyboard. When all keyboard is full then you continue the process of assigning keys but this time with Shift key pressed. The other difference would be that you do not rotate strong and weak hand for each symbol when the Shift is down. With shift key down first you would fill in central positions on the keyboard and then move to more distant positions.

When you do all that perform step 3 again for the new layout to see how the layout was improved.

You may have to carry your keyboard with you at all times. On the bright side nobody will touch your computer. It will make you look like a Pro.

Finally, don't forget to share your findings.


I'm playing with a variant of the Colemak layout at the moment with heavy changes of symbols:

without SHIFT:

` - { } [ ] ; < > ( ) _ =
q w f p g j l u y * / # \
a r s t d h n e i o '
z x c v b k m , . !

with SHIFT:

~ 1 2 3 4 5 6 7 8 9 0 & +
Q W F P G J L U Y @ ^ $ |
A R S T D H N E I O "
Z X C V B K M % : ?

Maybe I'll restore the / key...

But this is not based on any sound research, and I'd also love to see a layout optimized (Optimization including stuff like hand alteration etc, also ZXCV preservation, ...) with a sourcecode based corpus, because all these layouts seem to be optimized for prose only. For example, 'f' is a very common letter in C (if, for).

Update: I'm currently using

` - { } [ ] @ < > ( ) _ =
q w k r g y u l p * ; #
a s f t d h n e i o ' \
\ z x c v b j m , . /

with SHIFT:

~ 1 2 3 4 5 6 7 8 9 0 ^ +
Q W K R G Y U L P & ! $
A S F T D H N E I O " |
| Z X C V B J M % : ?

This is based on a 6-key-swap partial optimization taken from Carpalx with preservation of the usual Cut/Copy/Paste/Undo shortcuts and modified to give a better access to the usual programming characters.


Make a simple key logger, then count the number of times each key is pressed. Run it for a day or two, then save the output to a text file. Do this every once and a while. It doesn't matter what layout you are using, as you are just seeing which keys are being used the most.

If you want to make a good layout, you can't be afraid to go away from the norm. I'd suggest putting the top 11 keys along the home row, then the next top 11 keys as the top row (leave the 2 keys above the return key as the least used keys), then the 3rd top 11 keys as the bottom row. There should be 4 keys left over now. Take those and put them in the -= and ]\ slots. Congrats! You have now made a great keyboard layout for your purposes! =D


Overall, I think having a good text editor and knowing how to use it is better than trying to improve your typing speed. Being able to record and replay macros is sometimes a lifesaver, and a selection of shortcut-assigned code snippets can be handy because there's normally language-imposed limits on what can be turned into a library.

More generally, I think the real productivity enhancers are all about knowledge...

  • Knowing what tools and libraries are available and how to use them.
  • Knowing the overall structure of the code you're working on, not just your little bit.
  • Knowing key algorithms, design patterns and idioms so you don't have to reinvent them.
  • Knowing the rules well enough that you can be flexible - you know when to break them.
  • Knowing your co-workers and their strengths, weaknesses etc - ie knowing when to figure something out yourself, but also when and who to ask.

FWIW, I'm not claiming to be strong on all those. I've always been too biassed towards solving problems myself, and with too strong a tendency towards reinventing the wheel and grand architectural schemes.

Anyway, I just have this suspicion that time spent changing and learning keyboard layouts would be a distraction from more important issues.