moving up, down, right,left in unix

I wonder why it was decided to use '  h,j , k, l ' for moving up, right, left, bottom . I am curious why these letters were chosen instead of arrows. Why not some other letters. please advise
LVL 7
gudii9Asked:
Who is Participating?
 
farzanjCommented:
Are you talking about vi editor?
vi editor was designed by the computer geeks who are proper typists.  They do not want their hands to be moved out of the home row keys A-S-D-F and J-K-L-;
It makes it much faster for proper typists to stay as close to these keys as possible.
0
 
Dave BaldwinFixer of ProblemsCommented:
In addition, keyboards at that time often did not have arrow keys or function keys.  Here http://www.computermuseumgroningen.nl/icl/iclkeybig.jpg is a typical keyboard from that time.  
0
 
ozoCommented:
there is also a logic in that in ASCII, ctrl-H is backspace, ctrl-J is line feed, ctrl-K is vertical tab, and ctrl-L is form feed,
and on a Qwerty/Sholes keyboard, the 4 keys form a group with H on the left and L on the right.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
TintinCommented:
Back in ye olden days when Unix was developed, there were no standards for keyboards.   Each computer manufacturer had there own version the keyword layout.  The only common layout were the qwerty layout and the numbers.  All the other stuff varied greatly.

Some keyboards had arrows and some didn't.

Additionally, the keyboards and associated consoles all used different codes (hence if you look at a Unix terminfo database, you'll see hundreds and hundreds of different keyboard/console definitions).

So in short, vi was designed to operate at the most basic level, which meant that all the operations and navigation can be done via letters and numbers, along with the Esc and Ctrl keys.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Hi, the keys originate from the ADM-3A terminal keyboard, see this picture here. A quote from the wikipedia article about the ADM-3A terminal:

"Similarly, the use of the HJKL keys for moving the cursor in the vi editor and its descendants also stems from the ADM-3A; it had the cursor-movement arrows printed on those four keys."
0
 
Dave BaldwinFixer of ProblemsCommented:
I actually used an ADM-3A in school... a long time ago.  And in the late 70s, early 80s, it was common to program an Eprom to translate codes from one keyboard to another to make them work with different programs.  I even had a switch on the side of a terminal to change code sets.  This is non-IBM PC of course.
0
 
baretreeCommented:
oh my God... the more you know :P
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.