A keyboard layout is any specific physical, visual, or functional arrangement of key switches, legends, or (respectively) of a keyboard. Layouts are used on computer keyboards, for virtual keyboards (including mobile phones or other touchscreens), or other typographic input devices. Standard layouts vary depending on their intended writing system, language, and use case. Some hobbyists and designers create alternative layouts to better suit individual preferences or to extend functionality.
Layouts can be described in several ways depending on form or function. A layout is the positioning of physical keys on a keyboard. The arrangement of keycap legends, such as markings or labels, is described as a layout. Keyboard mapping represents a 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. (Windows 7 legacy features) 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 and ), 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 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 key can be used to alter the output of character keys, whereas the (control), (alternate) and (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 key. The 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 (alternative graphic), to the right of the space bar. (US keyboards just have a second 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 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 , and keys seen on commodity keyboards, Apple Keyboards have (command) and keys. The key is used much like the , and the key like the and , to access menu options and shortcuts. Macs have a 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 key on modern Mac keyboards, which is used for switching between use of the , , etc. keys either as function keys or for other functions like media control, accessing Spotlight, controlling the volume, or handling Mission Control. 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 key to the left of the letter , and the key in the bottom left. This position of the key was also used on the XO laptop, which did not have a . The UNIX keyboard layout also differed in the placement of the key and placed it to the left of .
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, , , , and , along with three shift keys, , , and . 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 results in (a with grave accent); followed by results in (E with grave accent). A grave accent in isolated form can be typed by striking and then .
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— or : a typical example might be 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 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 followed by (apostrophe) and then results in á (a with acute accent), followed by and then results in æ (ae ligature/letter), and followed by and then results in © (copyright symbol).
The 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 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 () and print screen ( or on some keyboards e.g. ) 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 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 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 () 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