Reload Original PagePrint PageEmail Page

History of Emacs & vi Keys (Keyboard Influence on Keybinding Design)

In my study of keyboarding in the past 20 years, i've noticed that the choices of many shortcuts in many apps are adopted to the many aspects of the keyboard hardware of the time in use by the community. Emacs's keybinding is not simply based on the first letter of commands, but the QWERTY layout's key positions have significant influence on it. This also applies to the letter choice of unix's shell commands. Much of this influences of design are unconscious.

Emacs's Meta and Control

As a example, emacs's Meta key, and heavy use of Control as primary modifier, and avoiding any 【Ctrl+⇧ Shift+‹letter›】 in its keyboard shortcuts, are caused by the lisp keyboard hardware and dumb terminals of 1980s.

Symbolics's lisp machine keyboard PN 365407 Rev C. Photo by Joey Devilla. Used with permission.
Left side.
Right side.

For more Lisp Machine keyboard photos, see: Space-cadet Keyboard and Lisp Machine Keyboards.

For detail, see: Why Emacs's Keyboard Shortcuts are Painful.

vi's Esc key and {j k h i}

Unix vi's use of j k h i for cursor movement, and the choice of Esc key for mode switching, came from the keyboard it was developed on, the ADM-3A terminal (1975).

terminal ADM-3A vi
The ADM-3A terminal. 2676×2370img src
terminal ADM-3A keyboard
Terminal ADM-3A keyboard. Note the position of the Esc key and the arrows on H J K L, also the position of Ctrl.
terminal ADM-3A numberical keypad
Terminal ADM-3A numberical keypad.
terminal ADM-3A keyboard layout
The ADM-3A terminal's keyboard layout. img src

Why is it {h j k l} and not {i j k l}? Again, it's by ease-of-implementation, not by design optimization.

The {h j k l} is chosen because the these letters in the ASCII encoding can be changed to ASCII's control characters by tweaking one bit. (theory source: (local copy))

Input MethodCtrl+hCtrl+jCtrl+ kCtrl+l
ASCII Control Charbackspacelinefeedvertical tabformfeed
Similar to

See: ASCII Table

Gaming's W A S D

The gaming's convention of W A S D for avatar movement keys, is also shaped by the PC keyboard's physical key layout used at the time.

Most people need to use the right hand for the mouse for operating a gun or view, so the left hand is used for controlling the avatar's movement. Right hand is the more dexterous hand for most people, and operating the gun for aim is usually more critical than moving the avatar.

So, to move the avatar, there's the arrow keys, but those have some problems. The arrow keys are on the right side of the keyboard, making it awkward to use with left hand. So, a cluster of keys on the left side of the keyboard is used instead.

But why

 A S D

and why not for example:

 S D F

keys? The E S D F are in the standard typing position. But, W A S D is more suitable here, because W A S D is on the neighbor of {Caps Lock, Tab ↹, ⇧ Shift, Ctrl, Alt}, that gamers needs to use for Firing, Shield, Jump, change weapon, etc. So, W A S D became the convention.

Also note that the common layout is QWERTY. W A S D is inverted T on QWERTY layout. For those using the Dvorak Keyboard Layout, the W A S D keys are scattered and is a problem. In fact, in the early days, many games do not respect user's choice of key layout in Operating System, nor does it provide ways for users to change the keys. Even today, some game software still have this problem, notably Second Life. (In the early days, say mid 1990s, Operating systems such as Windows hardly have a consistent keyboard layout API for programers anyway. Many software protocols, standards, layers, are gradually established as with most things.)

The X C V for Cut Copy Paste

Another history is the convention of X C V keys for Cut Copy Paste. This came from Apple.

 A S D
  Z X C V

Apple computer, in the 1980s, made the undo, cut, copy, paste concepts popular to the masses, and in general the computer keyboard shortcuts concept. These keys are chosen because they are all adjacent and on the left side of the keyboard, where under them there's the ⌘ Cmd key. Also in this set are Quit Q, Close W, Select All A, Save S, Duplicate D, and Undo Z. The only exceptions are Open O and Print P on the right side of keyboard.

All these keys have become de facto standard on all applications on {Windows, Mac, Linux} today, except the Z for undo and D for Duplicate.

See: Cut, copy, and paste.

Windows's PrtScn/SysRq for Screenshot

On today's PC keyboard, you'll find quite a few relic keys. PrtScn/SysRq, ScrLk, Pause/Break, Insert. They used to have meaningful purposes in the 1980 or earlier, some of them are separate keys. But computer hardware changes, and software changes, dramatically over the past 20 years. Keyboard itself did not change as fast. So, these keys became defunct. Because the name “Print Screen” somewhat relates to screen capture, so Microsoft have chosen it to be the key for saving screenshots. Similarly, the ⌫ Backspace key, was chosen as the key for web browser to go BACK to previous page. Note that this key is labeled “Delete” on Apple's keyboards, even they sent the exact same signal. In Apple's operating system, in Mac Classic of the 1990s or Mac OS X since early 2000s, this key was not used for browser's back function, only so around ≈2006 when Apple started to adopt many Windows's conventions.

See also: Difference Between Apple and PC keyboards.


If there's any conclusion, it is that many keyboard shortcut or hotkey choices are based on what is practical at the time. Issues of logical design, ergonomics, consistency, efficiency, are less important. Some of these concept didn't even exist at the time, and some choice was good at the time but computer keyboard has changed.

In retrospect, many of the choices are not the best today. For example, QWERTY layout was practical at the time, but the Dvorak Layout was invented too late, when convention was already established, and ergonomics isn't as big a concern at the time because not that many people need to use typewriters. But typing on computer is done by everyone today, for chatting, emails, all sorts of communication, and programing has become a field that's some million times more than the number of typists 40 years ago.

Emacs's primary modifier the Ctrl is much better at the Alt position on today's PC keyboards.

“vi”'s Esc might be better today at PC keyboard's Alt or Caps Lock. “vi”'s H J K L is still pretty good, but arguably, the following is better:

 J K L

And, QWERTY really should be Dvorak today.

The defunct keys: Insert, PrtScn, ScrLk, Pause, Break, really should be gone. There needs to be keys to switch to previous next app/window/tab, or toggle Show/Hide current window. The Num Lock on the number keypad also is a relic, from a time long past that keyboards don't have dedicate arrow keys and Page up/down Home/End etc keys.

Today, there needs to be keys to change sound level, play/pause music, next/previous song. Luckily, these have been on most keyboards since about mid 2000s, just that they have not been standardized in layout. Similarly, there needs keys to launch frequently used apps such as email, web browser. These have also been widely popular in keyboards. Also needed is keys for Open, Close, New. These are used in about every application on a hourly basis. Major keyboard makers Microsoft and Logitech have started to make keyboards with these functions pre-assigned to the F1 to F12 Function keys. However, it creates problems because these function keys already have uses in many applications, especially for programers. Microsoft also introduced the F-Lock key to toggle the purpose of the F function keys, but that created more problem than is worth. 〔☛ The F-Lock Key Problem

Xah Code

© 1995, …, 2012 Xah Lee.

当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
若有不妥, 欢迎评注提醒:


订阅 substack 体验古早写作:

点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:


关于 ~ DebugUself with DAMA ;-)
公安备案号: 44049002000656 ...::