Linked by Thom Holwerda on Fri 9th Mar 2012 19:11 UTC
General Development "I was reading about vim the other day and found out why it used hjkl keys as arrow keys. When Bill Joy created the vi text editor he used the ADM-3A terminal, which had the arrows on hjkl keys, so naturally he reused the same keys." As interesting as that is, John Graham-Cumming goes even further back in history. "The reason that keyboard had those arrows keys on it was because those keys correspond to CTRL-H, J, K, L and the CTRL key back then worked by killing bit 6 (and bit 5) of the characters being typed." Truly fascinating stuff, even though it's from way before my time (I'm from 1984).
Thread beginning with comment 510163
To read all comments associated with this story, please click here.
hjkl still ergonomic
by braddock on Fri 9th Mar 2012 23:02 UTC
Member since:

VI may have used hjkl because the terminal used it. But the terminal used it because it makes sense to use the home row for cursor movements.

It isn't just a historical fluke.

Reply Score: 1

RE: hjkl still ergonomic
by MacTO on Fri 9th Mar 2012 23:28 in reply to "hjkl still ergonomic"
MacTO Member since:

I'll go a step further and claim that the ASCII control codes explanation just doesn't cut it.

Think of it this way: these control codes are grouped, ASCII goes in alphabetical order, and QWERTY keyboards are not in alphabetical order. That leaves two options: ASCII was designed with this function in mind, or we have a bit of a coincidence on our hands. There are only two groups of letters that follow this linear pattern after all (hjkl, and dfgh) and many other scenarios where the movement keys would have been mapped all over the keyboard.

Reply Parent Score: 3

RE[2]: hjkl still ergonomic
by Anachronda on Sat 10th Mar 2012 00:43 in reply to "RE: hjkl still ergonomic"
Anachronda Member since:

You do realize that 'i' is missing from hjkl, right? And 'e' from dfgh? If you're going to allow omissions, erty also qualifies.

Reply Parent Score: 2

RE[2]: hjkl still ergonomic
by ctl_alt_del on Sat 10th Mar 2012 19:37 in reply to "RE: hjkl still ergonomic"
ctl_alt_del Member since:

I believe that the non-printing control codes (C0 codes) have a history dating back to the 1870's. First with the Baudot Code (circa 1870), to the Murray Code (circa 1900), to ITA-2 (circa 1930), to ASCII and ANSI variants now used. These were established for use with teleprinters to replace telegraph/Morse Code type transmissions.

So I would have to agree that this h-j-k-l layout of CO codes was indeed a intentional design. A "teletype" kind of functionality built into early dumb terminals and coded into vi and inherited by vim.

Reply Parent Score: 4