Lorenzo Bolla

qwerty vs dvorak vs colemak to edit Python code

Yesterday, I was intrigued by the idea of choosing a more efficient keyboard layout to work with everyday. As long as I type Python code 90% of my time, I decided to evaluate the efficiency of the first 3 most widespread keyboard layouts: QWERTY, Dvorak and Colemak. I used this excellent tool to compare the three layouts over the first 50000 characters of the webpy source code. Here are the results:

Overall effort

LayoutEffort% improvement over worst layout
Qwerty306,509.60.0 %
Dvorak283,868.77.4 %
Colemak275,347.610.2 %

Keys for each finger (stronger fingers should be used more often)

LayoutThumbsLPinkyLRingLMiddleLIndexRIndexRMiddleRRingRPinkyTotal
Qwerty25.9 %12.4 %5.3 %9.5 %11.6 %7.6 %5.6 %8.9 %13.2 %54,237.0 keys
Dvorak25.9 %13.0 %5.2 %8.1 %7.3 %7.5 %7.5 %8.2 %17.3 %54,237.0 keys
Colemak25.9 %12.7 %4.8 %7.5 %9.5 %8.4 %10.1 %6.6 %14.5 %54,237.0 keys
LayoutThumbsLeft handRight handTotal
Qwerty25.9 %38.8 %35.2 %54,237.0 keys
Dvorak25.9 %33.6 %40.5 %54,237.0 keys
Colemak25.9 %34.5 %39.6 %54,237.0 keys

Finger Travel Distance (only the horizontal)

LayoutThumbsLPinkyLRingLMiddleLIndexRIndexRMiddleRRingRPinkyTotal
Qwerty0.0 %18.1 %2.0 %10.5 %15.5 %12.1 %8.6 %9.9 %23.4 %1,441.5 m
Dvorak0.0 %21.1 %4.1 %3.5 %10.0 %12.5 %7.6 %10.8 %30.4 %1,210.3 m
Colemak0.0 %23.7 %2.5 %6.1 %10.2 %10.2 %9.3 %9.3 %28.6 %1,131.2 m
LayoutThumbsLeft handRight handTotal
Qwerty0.0 %46.0 %54.0 %1,441.5 m
Dvorak0.0 %38.8 %61.2 %1,210.3 m
Colemak0.0 %42.6 %57.4 %1,131.2 m

% home keys (out of all character keys plus SHIFT and ENTER, but excluding keys operated by thumbs)

LayoutPercentage
Qwerty20.4 %
Dvorak33.7 %
Colemak38.7 %

% keys typed with the same finger as the previous key (excluding repeating keys like ss)

LayoutPercentage
Qwerty4.5 %
Dvorak3.8 %
Colemak3.6 %

% keys typed with the same hand as the previous key (ex: in Qwerty sd or ss are included, but s s is not since you type the space with the other hand)

LayoutPercentage
Qwerty26.8 %
Dvorak20.0 %
Colemak24.6 %

% keys typed with the same hand as the previous key and jumping a row (ex: in Qwerty ev is a row jump – you jump over the middle row – and it’s awkward to type; ef is not a row jump)

LayoutPercentage
Qwerty10.3 %
Dvorak5.7 %
Colemak4.1 %

% keys typed with the same hand as the previous key and in reverse order (ex: in Qwerty df or kj are typed in the easier order pinky-ring-middle-index, whereas fd and jk are in reverse order index-middle-ring-pinky, and harder to type)

LayoutPercentage
Qwerty15.4 %
Dvorak11.9 %
Colemak15.2 %

% keys that need the SHIFT modifier

LayoutPercentage
Qwerty14.3 %
Dvorak14.3 %
Colemak14.3 %

Pairs of consecutive keys typed with the same finger in Qwerty

KeysFrequencyPercentage
:/NewLine/253 times0.47 %
de200 times0.37 %
tr158 times0.29 %
rt102 times0.19 %
ol99 times0.18 %
un98 times0.18 %
q_LeftShift_87 times0.16 %
ce86 times0.16 %
“/NewLine/81 times0.15 %
ed80 times0.15 %
}/NewLine/62 times0.11 %

Pairs of consecutive keys typed with the same finger in Dvorak

KeysFrequencyPercentage
ct196 times0.36 %
s_RightShift_169 times0.31 %
db152 times0.28 %
l_RightShift_137 times0.25 %
‘/LeftShift/133 times0.25 %
rn115 times0.21 %
ls100 times0.18 %
}/NewLine/62 times0.11 %
=/RightShift/59 times0.11 %
“/LeftShift/58 times0.11 %
e.58 times0.11 %

Pairs of consecutive keys typed with the same finger in Colemak

KeysFrequencyPercentage
:/NewLine/253 times0.47 %
ue237 times0.44 %
db152 times0.28 %
e,89 times0.16 %
q_LeftShift_87 times0.16 %
“/NewLine/81 times0.15 %
}/NewLine/62 times0.11 %
]/NewLine/46 times0.08 %
pt44 times0.08 %
‘/RightShift/41 times0.08 %
“/RightShift/41 times0.08 %

Key frequency in your text

KeyFrequencyPercentage
/Space/14067 times25.94 %
/LeftShift/4391 times8.10 %
e3239 times5.97 %
t2184 times4.03 %
s2170 times4.00 %
r1890 times3.48 %
a1619 times2.99 %
o1557 times2.87 %
l1530 times2.82 %
n1519 times2.80 %
/NewLine/1511 times2.79 %
i1372 times2.53 %
/RightShift/1357 times2.50 %
d1014 times1.87 %
f971 times1.79 %
c855 times1.58 %
u851 times1.57 %
m716 times1.32 %
p715 times1.32 %
(674 times1.24 %
)673 times1.24 %
.658 times1.21 %
‘623 times1.15 %
,573 times1.06 %
b571 times1.05 %
“563 times1.04 %
_554 times1.02 %
=518 times0.96 %
:490 times0.90 %
q463 times0.85 %
y423 times0.78 %
h416 times0.77 %
w352 times0.65 %
>348 times0.64 %
g304 times0.56 %
v257 times0.47 %
x253 times0.47 %
k231 times0.43 %
<154 times0.28 %
/125 times0.23 %
[]119 times0.22 %
;113 times0.21 %
086 times0.16 %
`85 times0.16 %
+84 times0.15 %
181 times0.15 %
{80 times0.15 %
}79 times0.15 %
-78 times0.14 %
j76 times0.14 %
*72 times0.13 %
#69 times0.13 %
267 times0.12 %
%55 times0.10 %
$52 times0.10 %
331 times0.06 %
629 times0.05 %
818 times0.03 %
@17 times0.03 %
14 times0.03 %
z13 times0.02 %
513 times0.02 %
48 times0.01 %
?8 times0.01 %
97 times0.01 %

Frequent pairs of keys in your text

Key PairFrequencyPercentage
_Space__Space_9243 times17.04 %
_NewLine__Space_1233 times2.27 %
_Space__LeftShift_805 times1.48 %
/LeftShift/(674 times1.24 %
/LeftShift/)673 times1.24 %
/LeftShift/”563 times1.04 %
_LeftShift__554 times1.02 %
se549 times1.01 %
,/Space/543 times1.00 %
/LeftShift/:490 times0.90 %
el405 times0.75 %
er377 times0.70 %
in364 times0.67 %
_Space__RightShift_362 times0.67 %
or352 times0.65 %
/LeftShift/>348 times0.64 %
/Space/i344 times0.63 %
/Space/s341 times0.63 %
te340 times0.63 %
e_LeftShift_338 times0.62 %
=/Space/332 times0.61 %
/Space/=321 times0.59 %
re306 times0.56 %
lf294 times0.54 %
)/NewLine/281 times0.52 %
e_Space_281 times0.52 %

Actually, I was disappointed: there seem to be no clear advantage of Dvorak or Colemak, wrt QWERTY and, given the popularity of the latter, switching does not seem to be a good idea…

#Programming #Python