← blog

Why hjkl? Blame a terminal from 1978

2026-07-173 min readBeginner
#history#motions

Every new Vim user asks the same question in the first thirty seconds: why on earth do the arrow keys live on h, j, k, l?

The honest answer has two halves. The historical half is an accident. The practical half is why nobody has fixed the accident in fifty years.

The accident

Bill Joy wrote vi in 1976 at Berkeley. He wrote it on the terminal he had: a Lear Siegler ADM-3A.

Look at a photo of that keyboard sometime. It has no arrow keys — or rather, it does, and they're printed on the h, j, k and l keys. Those four keys did double duty: letters normally, cursor movement with the Control key held down.

So when Joy needed movement keys, he didn't design anything. He used the ones already drawn on the plastic in front of him.

That's it. That's the whole story. The most distinctive thing about the world's most opinionated text editor is a hardware layout decision made by a terminal manufacturer that went out of business decades ago.

While you're looking at that photo, notice two more things. Escape sits where Tab is on your keyboard — right next to Q, easy to hit with a lazy pinky. And Control is where Caps Lock is. Half of Vim's ergonomics assume a keyboard almost nobody has owned since the Carter administration.

Why it survived anyway

Here's the part that surprises people: the accident turned out to be right, for a reason that has nothing to do with 1978.

Put your right hand on the home row. Your index finger rests on j. Now h, j, k, l are directly under four fingers that are already there. You move the cursor without moving your hand.

Now reach for the arrow keys. Your hand leaves the home row, travels to the bottom-right of the keyboard, does its work, and travels back. Then your fingers hunt for their positions again — a fraction of a second, every single time.

That round trip is the whole argument. Not typing speed: hand position. Vim's entire design assumes your hands never leave home, which is also why the escape from insert mode, the operators, the counts and the text objects are all crammed into the middle three rows.

Arrow keys break that assumption. hjkl preserves it. The fact that this was discovered by accident doesn't make it less true.

Which is which

The mnemonic that actually sticks:

Some people prefer: j looks like an arrow pointing down. Either way, you'll stop thinking about it after about twenty minutes of use, permanently.

The trap you should avoid

Vim does support the arrow keys. They work fine. And that's exactly the problem.

If you leave yourself the arrows as an escape hatch, you'll use them, because they're familiar and hjkl isn't yet. Two weeks later you'll still be reaching, your hands will still be leaving home, and you'll conclude that Vim's famous ergonomics are overrated — having never actually tried them.

A lot of people disable the arrow keys for the first fortnight for exactly this reason. It's not purism. It's that the benefit only shows up on the other side of the habit, and the arrows keep you on this side.

The real point

hjkl isn't the interesting part of Vim. It's the tollbooth — the small, slightly silly obstacle sitting in front of the actual thing, which is a grammar for editing text.

But you can't skip it, because every other command assumes your hands are home. So pay the toll early. It costs one afternoon.

The first kata is nothing but hjkl. It takes about a minute, and it's the last time you'll think about this question.