Blame the ADM-3A for Vim and Emacs

One of the eccentricities of the vim text editor that is most divisive is its cursor movement keys. While most people use their keyboard’s dedicated arrow keys to move their text editor’s cursor around (and vim does begrudgingly allow you to do this), vim users leave their text editor in a command mode and use the keys h, j, k, and l to move the cursor. h and l move the cursor to the left and right, while j and k move it down and up, respectively.

Vim apologists (like myself) often justify this scheme by explaining that it avoids the need to move your hand off the keyboard to move the cursor. This is certainly true, but it doesn’t seem like an entirely satisfactory explanation: the right hand rests on “jkl;”, not “hjkl”. So why make the user move their hand one key to the left for cursor movement?

The answer is that the use of “hjkl” was not an optimization decision, it was an accommodation. Early teletypewriters and terminals simply didn’t have arrow keys, so something else had to be used. The specific keys h, j, k, and l were chosen for an obvious reason: vi was written using an ADM-3A.

The ADM-3A was the third generation of display terminals manufactured by California company Lear Siegler. The ADM-3A was released in 1974, so it predates the DEC VT100 by four years – but the VT100 and later VT200 are almost the only terminals that modern users remember. The VT200 represented the apex of terminal development for most practical purposes, and so modern X terminals identify themselves as VT200s to cause the shell to enable all features. Before the VT100 and VT200, though, the ADM-3A was king. This was mostly due to price.

At just $1,195 (in 1974 dollars!), the ADM-3A was one of the cheapest options on the market but still came with a fairly complete feature set for basic users. The core feature set did not include lower-case letters, of course, but if you really needed them, they were available as an option. The low price was mostly due to the ADM-3As simple design: almost all functionality was implemented directly in hardware, without nary a microprocessor to be found. Configuration was via DIP switches, and added features came in hardware module form.

The low price of the ADM-3A made it incredibly popular, especially in the cash-strapped academic environment. UC Berkeley used the ADM-3A exclusively, and vi was developed by Berkeley student Bill Joy.

The ADM-3A had no arrow keys. Instead, it had arrows printed on alphabetic keys – left on h, down on j, up on k, and right on l. Sound familiar? The alarming reality of the vim movement keys is that they were simply the hacky pseudo-arrow keys included on the budget terminal used by the original developer. While disappointing, this is essentially the same reasoning behind almost every decision in computer history. It was relatively cheap and relatively convenient.

The ADM-3A keyboard’s pecularities are not limited to the arrow keys, though, and neither is its impact on modern Linux. Although the validity of this connection is somewhat contested, it is hard not to notice that the ADM-3A has “Home” and “~” printed on the same key in the upper right, which many suspect was a motivation for the now ubiquitous use of the tilde (~) as a shortcut for a user’s home directory.

Finally, the control key is located not on the bottom left but directly above the shift key, where Caps Lock is placed on modern keyboards. Similarly, the Escape key is placed where ~ is on modern keyboards. Both of these keys are thus much easier for a typist to reach on the ADM-3A than on a modern keyboard, and this placement wasn’t particularly unusual on older terminals. Modern vim and emacs users often complain about how the Escape and Control keys, heavily used in the two text editors respectively, are uncomfortable to strike frequently. This is a defect of modern keyboards, one introduced after both of these programs were originally written.

Indeed, when emacs users remap their Caps Lock keys to function as Control (something that I recommend, even as a foreigner in the emacs world), they are just adjusting their keyboards to act a bit more like the ancient terminal keyboards their software was written for.

A lot of great information about the ADM-3A has been collected by Marc Roessler here.

  • history/computers/adm3a.txt
  • Last modified: 2020/11/16 23:46
  • (external edit)