Arrow Keys Efficiency: vim HJKL vs IJKL

By Xah Lee. Date: . Last updated: .

vim use {h j k l} keys to move cursor. Another approach is Inverted T {i j k l}. This page investigates which is more efficient.

ADM 3A terminal layout 6aec4
The ADM-3A terminal keyboard layout. [see History of Emacs and vi Keys]

Considering Key Frequency

Let's assign score to key positions with respect to ease of key press. Let's set k to have the max score of 1. We'd have something like this:

                  I
                 0.8
      H     J     K     L
     0.5   0.9    1    0.7

now look at these command's frequency.

Arrow Keys Frequency
keycommand%
previous-line15.48
next-line17.10
backward-char3.23
forward-char5.51

[see Emacs's Command Frequency Statistics]

Multiply the percentage with the score.

Interactive Vim HJKL vs IJKL Efficiency Calculator

Key ease score:






Key Frequency:





Score:

Vi Inverted T

(higher is better)

Try to adjust the key score or command frequency. Overall, score comes out about the same. But if key frequency is set to all equal, as in playing pacman, then Inverted T wins.

This test only considers ease of each key press. For just these 4 keys, this simple measure can be considered a reasonable test of efficiency. But note that a robust test should also consider bigram frequency and other factors. [see What's the Most Efficient Keyboard Layout?]

Considering Bigrams

google pacman
Google Pacman

vi has h moved away, while inverted T has the i moved away. Which one is better? I think if you consider this, then the inverted T is better. Because, consider all 2-key combinations involving the one key that's moved away. The vi way, involving a moved index finger left/right for , is more costy than the moved middle finger up/down. This with vi is pretty bad. This can be easily seen when playing pacman.

Considering Intuitiveness

Another factor is intuitiveness. The inverted T is more intuitive. vi's row arrows require learning. That's one big win for inverted T.

Conclusion

Inverted T is probably slightly better. The winning point is when considering bigram. vi's way is especially bad when you have frequent left/right movement.

If you have a question, put $5 at patreon and message me.

  1. Ergo Keyboards
  2. PC Keyboards 🖮
  3. Fun Keyboards
  4. Keypads
  5. Do-It-Yourself
  6. History
  7. Design
  8. Layout
  9. Keybinding
  10. Typing 🤚
  11. Software
  12. Mouse 🖱
  13. Trackball 🖲
  14. Trackball History
  15. Typewriters
  16. Misc 🎹
  17. Blog