Lably
Skip to content

Keyboard layout

Arrangement of keys on a typographic keyboard

  • 65 min read
  • 7 chapters

Related on Lably

Through Computer keyboard, Writing system and Language

Layouts can be described in several ways depending on form or function. A physical layout is the positioning of physical keys on a keyboard. The arrangement of keycap legends, such as markings or labels, is described as a visual layout. Keyboard mapping represents a functional layout, or the association of keys with their action when pressed. This is configured in software or firmware, and determines the action upon one or multiple key presses, regardless of key appearance.

Modern computer keyboards are designed to send a scancode to the operating system (OS) when a key is pressed or released. This code reports only the key's row and column, not the specific character engraved on that key. The OS converts the scancode into a specific binary character code using a "scancode to character" conversion table, called the keyboard mapping table. This means that a physical keyboard may be dynamically mapped to any layout without switching hardware components—merely by changing the software that interprets the keystrokes. Often, a user can change keyboard mapping in system settings. In addition, software may be available to modify or extend keyboard functionality. Thus the symbol shown on the physical key-top need not be the same as appears on the screen or goes into a document being typed. Most modern USB and wireless keyboards are plug-and-play, and communicate their (default) visual layout to the OS when connected. Some keyboards have firmware which can configure layouts, as well as customize lighting and other functions.

Key types

A computer keyboard may consist of several types of keys, including alphanumeric or character keys for typing, modifier keys for altering the functions of other keys, navigation keys (or nav cluster) for moving the text cursor (or caret), function keys and system keys for special actions (such as Esc and Break), and a numeric keypad to facilitate calculations or data entry.

Different keyboard models vary in physical layout, such as in the number of keys and how they are positioned on the keyboard. However, most layouts localized for other languages differ in keycap legends rather than physical position.

Character keys

The core section of a keyboard consists of character keys, which can be used to type letters and other characters. Typically, there are three rows of keys for typing letters and punctuation, an upper row for typing digits and special symbols, and the Space bar on the bottom row. The positioning of the character keys is similar to the keyboard of a typewriter.

Modifier keys

Besides the character keys, a keyboard incorporates special keys that do nothing by themselves but modify the functions of other keys. For example, the ⇧ Shift key can be used to alter the output of character keys, whereas the Ctrl (control), Alt (alternate) and AltGr (alternative graphic) keys trigger special operations when used in concert with other keys. (Apple keyboards have differently labelled but equivalent keys, see below).

Typically, a modifier key is held down while another key is struck. To facilitate this, modifier keys usually come in pairs, one functionally identical key for each hand, so holding a modifier key with one hand leaves the other hand free to strike another key.

An alphanumeric key labelled with only a single letter (usually the capital form) can generally be struck to type either a lowercase or capital letter, the latter requiring the simultaneous holding of the ⇧ Shift key. The ⇧ Shift key is also used to type the upper of two symbols engraved on a given key, the lower being typed without using the modifier key.

The Latin alphabet keyboard has a dedicated key for each of the letters A–Z, keys for punctuation and other symbols, usually a row of function keys, often a numeric keypad and some system control keys. In most languages except English, additional letters (some with diacritics) are required, and some are present as standard on each national keyboard, as appropriate for its national language. These keyboards have another modified key, labelled AltGr (alternative graphic), to the right of the space bar. (US keyboards just have a second Alt key in this position). It can be used to type an extra symbol in addition to the two otherwise available with an alphanumeric key, and using it simultaneously with the ⇧ Shift key usually gives access to a fourth symbol. These third-level and fourth-level symbols may be engraved on the right half of the key top, or they may be unmarked. Cyrillic alphabet and Greek alphabet keyboards have similar arrangements.

Instead of the Ctrl, Alt and AltGr keys seen on commodity keyboards, Apple Keyboards have ⌘ Cmd (command) and ⌥ Option keys. The ⌥ Option key is used much like the AltGr, and the ⌘ Cmd key like the Ctrl and Alt, to access menu options and shortcuts. Macs have a Ctrl key for compatibility with programs that expect a more traditional keyboard layout. The key can generally be used to produce a secondary mouse click as well. There is also a Fn key on modern Mac keyboards, which is used for switching between use of the F1, F2, etc. keys either as function keys or for other functions like media control, accessing Spotlight, controlling the volume, or handling Mission Control. Fn key can also be found on smaller Windows and Linux laptops and tablets, where it serves a similar purpose.

Many Unix workstations (and also home computers like the Amiga) keyboards placed the Ctrl key to the left of the letter A, and the ⇪ Caps Lock key in the bottom left. This position of the Ctrl key was also used on the XO laptop, which did not have a ⇪ Caps Lock. The UNIX keyboard layout also differed in the placement of the Esc key and placed it to the left of 1.

Some early keyboards experimented with using large numbers of modifier keys. The most extreme example of such a keyboard, the so-called "space-cadet keyboard" found on MIT LISP machines, had no fewer than seven modifier keys: four control keys, Ctrl, Meta, Hyper, and Super, along with three shift keys, ⇧ Shift, Top, and Front. This allowed the user to type over 8000 possible characters by playing suitable "chords" with many modifier keys pressed simultaneously.

Dead keys

A dead key is a special kind of modifier key that, instead of being held while another key is struck, is pressed and released before the other key. The dead key does not generate a character by itself, but it modifies the character generated by the key struck immediately after, typically making it possible to type a letter with a specific diacritic. For example, on some keyboard layouts, the grave accent key ` is a dead key: in this case, striking ` and then a results in à (a with grave accent); ` followed by ⇧ Shift+E results in È (E with grave accent). A grave accent in isolated form can be typed by striking ` and then Space bar.

A key may function as a dead key by default, or sometimes a normal key can temporarily be altered to function as a dead key by simultaneously holding down the secondary-shift key—AltGr or ⌥ Option: a typical example might be AltGr+6 a will produce â (assuming the "6" key is also the "^" key). In some systems, there is no indication to the user that a dead key has been struck, so the key appears dead, but in some text-entry systems the diacritical mark is displayed along with an indication that the system is waiting for another keystroke: either the base character to be marked, an additional diacritical mark, or Space bar to produce the diacritical mark in isolation.

Compared with the secondary-shift modifier key, the dead-key approach may be a little more complicated, but it allows more additional letters. Using AltGr, only one or (if used simultaneously with the normal shift key) two additional letters with each key, whereas using a dead key, a specific diacritic can be attached to a range of different base letters.

Compose key

A Compose key can be characterized as a generic dead key that may, in some systems, be available instead of or in addition to the more specific dead keys. It allows access to a wide range of predefined extra characters by interpreting a whole sequence of keystrokes following it. For example, striking Compose followed by ' (apostrophe) and then A results in á (a with acute accent), Compose followed by A and then E results in æ (ae ligature/letter), and Compose followed by O and then C results in © (copyright symbol).

The Compose key is supported by the X Window System (used by most Unix-like operating systems, including most Linux distributions). Some keyboards have a key labeled "Compose", but any key can be configured to serve this function. For example, the otherwise redundant right-hand ⊞ Win key may, when available, be used for this purpose. This can be emulated in Windows with third-party programs, such as WinCompose.

System command keys

Depending on the application, some keyboard keys are not used to enter a printable character but instead are interpreted by the system as formatting, mode shift, or special commands. These may be found on personal computer keyboards.

SysRq and PrtSc

The system request (SysRq) and print screen (PrtSc or on some keyboards e.g. PrtScn) commands often share the same key. SysRq was used in earlier computers as a "panic" button to recover from crashes (and it is still used in this sense to some extent by the Linux kernel; see Magic SysRq key). The print screen command is used to capture the entire screen and send it to the printer, but in the present, it usually puts a screenshot in the clipboard.

Break key

The Break or Pause key no longer has a well-defined purpose. Its origins go back to teleprinter users, who wanted a key that would temporarily interrupt the communications line. The Break key can be used by software in several different ways, such as to switch between multiple login sessions, to terminate a program, or to interrupt a modem connection.

In programming, especially old DOS-style BASIC, Pascal and C, Break is used (in conjunction with Ctrl) to stop program execution. In addition to this, Linux and variants, as well as many DOS programs, treat this combination the same as Ctrl+C. On modern keyboards, the break key is usually labeled Pause/Break. In most Microsoft Windows environments, the key combination WindowsPause brings up the system properties.

Escape key

The escape key (often abbreviated Esc) usually signals Stop, QUIT, or "let me get out of a dialog" (or pop-up window).

Another common application today of the Esc key is to trigger the Stop button in many web browsers and operating systems.

ESC was part of the standard keyboard of the Teletype Model 33 (introduced in 1964 and used with many early minicomputers). The DEC VT50, introduced July 1974, also had an Esc key. The TECO text editor (c. 1963) and its descendant Emacs (c. 1985) use the Esc key extensively.

Historically, it also served as a type of shift key, such that one or more following characters were interpreted differently, hence the term escape sequence, which refers to a series of characters, usually preceded by the escape character.

On machines running Microsoft Windows, prior to the implementation of the Windows key on keyboards, the typical practice for invoking the "start" button was to hold down the control key and press Escape. This process still works in Windows 10 and 11.

Enter key

An "enter" key may terminate a paragraph of text and advance an editing cursor to the start of the next available line, similar to the "carriage return" key of a typewriter. When the attached system is processing a user command line, pressing "enter" may signal that the command has been completely entered and that the system may now process it.

Shift key

When one presses a letter, it will capitalize the letter pressed with the shift key. Another use is to type more symbols than appear to be available; for instance, the semi-colon key is accompanied by a colon symbol on the top. To type a semi-colon, the key is pressed without pressing any other key. To type a colon, both this key and the Shift key are pressed concurrently. Some systems make provision for users with mobility impairment by allowing the Shift key to be pressed first and then the desired symbol key.

The Menu key, or Application key, is found on Windows-oriented computer keyboards. On Apple keyboards, the same function is provided by the Command key (labelled ⌘). It is used to launch a context menu with the keyboard rather than with the usual right mouse button. The key's symbol is usually a small icon depicting a cursor hovering above a menu. On some Samsung keyboards, the cursor in the icon is not present, showing the menu only. This key was created at the same time as the Windows key. This key is normally used when the right mouse button is not present on the mouse. Some Windows public terminals do not have a Menu key on their keyboard to prevent users from right-clicking (however, in many Windows applications, a similar functionality can be invoked with the Shift+F10 keyboard shortcut).

The Windows key opens the 'Start' (applications) menu.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Computing and communication