I often hear complaints that programming languages that make heavy use of symbols for brevity, most notably C and C++ (I'm not going to touch APL), are difficult to type because they require frequent use of the shift key. A year or two ago, I got tired of it myself, downloaded Microsoft's Keyboard Layout Creator, made a few changes to my layout, and have not once looked back. The speed difference is astounding; with these few simple changes I am able to type C++ code around 30% faster, depending of course on how hairy it is; best of all, my typing speed in ordinary running text is not compromised.
My questions are these: what alternate keyboard layouts have existed for programming, which have gained popularity, are any of them still in modern use, do you personally use any altered layout, and how can my layout be further optimised?
I made the following changes to a standard QWERTY layout. (I don't use Dvorak, but there is a programmer Dvorak layout worth mentioning.)
- Swap numbers with symbols in the top row, because long or repeated literal numbers are typically replaced with named constants;
- Swap backquote with tilde, because backquotes are rare in many languages but destructors are common in C++;
- Swap minus with underscore, because underscores are common in identifiers;
- Swap curly braces with square brackets, because blocks are more common than subscripts; and
- Swap double quote with single quote, because strings are more common than character literals.
I suspect this last is probably going to be the most controversial, as it interferes the most with running text by requiring use of shift to type common contractions. This layout has significantly increased my typing speed in C++, C, Java, and Perl, and somewhat increased it in LISP and Python.
0
nearly as often as you type)
? @Jason: d) people who have had entirely way too much caffeine. ;) – SplashyC-b
,C-f
,C-p
, andC-n
respectively, whereC-
is the Emacs notation for “Control”. Similarly, in Vim you haveh
,j
,k
, andl
when not in insert mode. – Splashy_
with backtick,(
with;
, and)
with \, using MSKLC. – Beagle.klc
file manually.) – Julenejulep{
/}
is 14.67 times of[
/]
,"
is 113.22 times of'
,*
is 9.57 times of8
,(
is 4.31 times of9
,_
is 3.47 times of-
. – Shackelford