In France, learning how to properly type on a keyboard isn't part of the syllabus. Since you just have to press a key to write a character, it is perceived as a minor technical skill, far less important than handwriting, or any other "intellectual" activity.
After having fixed my self-taught typing technique, I strongly disagree. Touch typing is an essential skill for any computer users, not only for programmers. There are productivity benefits, thanks to better speed, accuracy, and focus. Touch typing should be taught the first time students put their hands on a keyboard.
If you feel that your typing technique slows you down, this article is for you. It explains what touch typing is, how to learn it effectively, along with a discussion about its limitations.
Originally, touch typing refers to the ability to type on a keyboard without having to look down for the location of the keys. Nowadays, this term is used to describe the precise finger placement to achieve typing by touch, as opposed to the hunt-and-peck method, which requires looking at the keyboard, searching for a character, and pressing it (usually with the index finger). Often, self-taught typists develop a hybrid technique, with the ability to write some sequences of characters without looking.
The advantage of touch typing over self-taught techniques is the methodical approach: each key is associated with a single finger, and you use all of them. You don't have to adjust the way you type for new words, you can keep your hands steady, use ergonomic keyboards, work comfortably in any lighting condition, without backlighting, without even labels.
With enough training, you can improve your typing speed and accuracy. It strengthens your focus on tasks that require deep thinking, such as programming or serious writing. For less intensive tasks like note-taking and messaging, your productivity is directly correlated with your typing abilities.
The goal of touch typing is to write at a computer without having to think about it, because you don't have to split your attention between the screen and the keyboard. With some practice, muscle memory takes over and the process becomes subconscious. Fewer typing mistakes mean you can work uninterrupted, reaching a state of flow, as if you were streaming your thoughts right to the machine.
Learning touch typing takes some time. It requires dedication if you have to relearn how to type on a keyboard, but it is highly rewarding. Focus on reaching a reasonable speed and accuracy, and then you can go back to whatever you were doing before with a productivity boost.
Many learning resources exist for touch typing, including gamified applications more appealing to children. They all contain lessons that progressively introduce new keys with different methods. Here are some examples:
- TypingClub: lessons based on repetition until you reach a speed and accuracy threshold. (It contains intrusive ads.)
- TypingAcademy: less repetitive, as it presents words in a random order for each lesson.
- Keybr: introduces new keys as you practice on randomly-generated words. (You should disable the setting Forgive Errors that may delay your progression by encouraging you to focus on speed instead of accuracy.)
Once you have completed one of the previous typing course, you should know how to type each character without looking. But you can further improve with practice:
- MonkeyType: train on top words, many available languages. (Free and open source, highly configurable, and modern alternative to 10FastFingers.)
- TypeRacer: race against other users on quotes from books, movies, and songs (with uppercase letters, punctuation, numbers).
- TouchType.co: train on random number sequences. (Focus on the number row.)
- SpeedCoder: practice on program source code.
At the beginning of your journey, your speed will decrease dramatically, to the point where you cannot really do much at a computer anymore. As you introduce new characters and symbols, your speed will drop again. However discouraging it may feel, it's actually a good thing. Some amount of difficulty is required to learn effectively.
Dedicate a week to learn all the basics and fully commit to this new technique. You won't be able to do any productive work at the computer aside from learning touch typing itself, and for the next few weeks, you will find difficult to work with tools such as Vim, but you will have to do it anyway.
With an average of 20 minutes of practice per day, along with short programming sessions, it took me less than a month to recover my previous speed of 50 WPM for letters and basic symbols. After three months of regular practice, I was feeling more productive than ever. After a year of occasional practice, my typing speed had doubled to 100 WPM.
- Never look down at the keyboard, including when you position yourself on the home row. Instead, rely on the small bumps on f and j.
- Abandon your old way of typing altogether. It may be difficult if your job depends on it, but switching back and forth will hinder your progress.
- Focus on accuracy, not speed. Fixing a mistake consumes more time than slowing down to avoid it. You may find helpful for the early lessons to put a little bit more pressure on the keys and really break down your finger movements.
- Keep your hands steady, moving only your fingers. Before you start typing, position your hands so you can comfortably reach all the letters.
- Return your fingers to the home row after each key press. In the beginning, try to move only one finger at a time, keeping the others on the home row.
- For uppercase letters and symbols, always use the opposite Shift key.
- Instead of pressing Backspace multiple times to fix a mistake, use Ctrl+Backspace to delete the last word and retype it.
- Feel free to adjust any rule or convention that slows you down. For instance, it might be easier for you to reach Backspace with the ring finger than with the pinky, or to always press the space bar with the same finger (use your left thumb if you want to use AltGr with the right one).
The main limitation of touch typing is that it is tied to the keyboard layout. If you switch to another layout, you will have to learn it again (at least partially).
Even on the same layout, there may be different methods. Most learning materials agree on pressing b with the left index, but there is no equivalent convention for 6. Unfortunately, that affects how to press the numbers on the left side, including the associated symbols, and which Shift key to use.
If you want to stick with the simple rule that each finger is responsible for one or more "column," press 6 with your right index. Most learning resources teach it this way and it also works for ortholinear layouts, which arranges the keys on a grid, as opposed to staggered layouts.
If you plan on using a split staggered keyboard, you will likely have to press 6 with your left index, because this is the choice that was made for the first popular keyboard of this kind.
How about key bindings? The rule is the same as for Shift: use the modifiers on the opposite side of the other key pressed in combination.
With a single modifier, you don't have to move your hand:
- Ctrl, Shift, Super: pinky.
- Alt: ring or thumb.
Note that modifiers can vary in location and size, so you may have to adapt these affectations depending on your actual keyboard. Nevertheless, you should be able to reach these keys without moving your hands.
With multiple modifiers, you have to move your hands. Try to place your fingers as follows:
- Ctrl: pinky.
- Shift: ring.
- Super: middle.
- Alt: thumb.
With this positioning, you can press any number of modifiers on both sides with a consistent technique.
Vimers use Escape extensively. Vi was created on the ADM-3A keyboard, that has Escape at the location of the modern Tab, and Control at the location of the modern Caps Lock. Some programmers remap Caps Lock to Control to make most keybindings easier. With this configuration, Ctrl+[ is used as an alternative to Escape.
How good is it to find the keys by touch if they completely change depending on the keyboard layout?
The ANSI and ISO layouts are physical keyboard layouts. The ISO layout is most commonly used in Europe, whereas the ANSI layout is used in the rest of the world. They only have two minor differences:
|Enter||Wide rectangle, \| is above it.||Upside-down L shape, \| is on its left.|
|LShift||Wide.||Narrow, to accomodate for an extra key on its right.|
Personally, I'm not a fan of the ISO layout, because it makes Enter and LShift farther away from the home row, the location of the extra key isn't great, and there are less ISO keycap sets for custom mechanical keyboards. That being said, their differences are not that significant compared to logical layouts.
QWERTY is a logical layout that was designed for the Sholes and Glidden typewriter in 1983. The statement that it was created to prevent jamming is disputed, but the staggered layout was necessary to arrange the arms that connect the keys to the type bars. More than a century later, the QWERTY layout is still widely used.
This layout gives easy access to the common symbols, without dead keys (which must be followed by another key to register a character), and with modifiers on both sides. Most programming languages were designed with this layout in mind, which influenced the choice of programming symbols. The same happened with application key bindings, for instance, hjkl in Vi or wasd in video games. In my opinion, this popularity is the main reason for choosing QWERTY over any other layout.
But there are more or less recent alternatives such as Dvorak and Colemak (and regional variants, e.g., BÉPO for French). They were conceived to keep the fingers on the home row as much as possible and distribute the key presses between both hands. The main issue is that they are uncommon. A different keyboard layout is inconvenient when you work with a colleague on the same machine, or with applications based on more common layouts.
Assuming QWERTY was made to prevent jamming, then it had to distribute the key presses, which implies at least some efficiency. Because you can reach higher typing speed with less effort on alternative layouts, it isn't the greatest for sure, but it isn't the worst possible either.
If you choose QWERTY, how do you type characters from foreign languages? The QWERTY international layout provides additional symbols, but the issue is that ^, ', ", and ` are all dead keys, which makes programming impractical in any language other than Brainfuck.
The first solution is to use a layout based on QWERTY, but tailored for your language. Unless your keyboard has an extra key, the layout must remap an existing one. A common choice is to replace RAlt with AltGr, that you can press with your right thumb. With QWERTY-frenglish, I made the basic French symbols accessible with AltGr, but there are similar layouts for other languages.
The downside is that key combinations relying on RAlt don't work anymore. In a terminal, you may need keybindings based on RAlt, and at the same time, symbols for another language. This requires switching between multiple layouts, which is extremely inconvenient.
Another solution is to use a compose key. When you press Compose, the next character sequence is interpreted as a chord, with mnemonic mappings:
- Compose e ' outputs
- Compose e ` outputs
- Compose o e outputs
Although Compose disappeared from modern keyboards, you can still
remap it to an existing key. Menu is a prime candidate: it is rarely
used, you can press it without moving your hands, and when you actually need
it, Shift+F10 triggers the same function. On Linux, you
only have to run
setxkbmap us -option compose:menu to configure
Menu as a compose key, but there are other
(To unset XKB options, run
setxkbmap us -option.)
As computers are becoming ubiquitous in the workspace, everyone should learn touch typing. I developed an inefficient technique, that limited my abilities until I finally took the time to learn how to type properly. It takes a few months to get acquainted, but you will quickly enjoy better speed, accuracy, and focus.
Unfortunately, there exist multiple keyboard layouts and touch typing depends on them. ANSI QWERTY is the most popular, but it has a restricted character set, unsuitable for foreign languages. With a compose key mapped to Menu, you can access any symbol through mnemonic character sequences.
In the realm of custom mechanical keyboards, you can further customize the layout (and lighten your wallet):
- A programmable keyboard gives you access to extra keys (e.g., a keyboard based on QMK with a split space bar).
- With a split keyboard, you can adopt a more natural position by spacing your hands at shoulder width and keeping them aligned with your forearms.
- An ortholinear layout features straight columns, as opposed to a staggered layout.