Keyboard shortcut

Last updated
Firefox 3.0 menu with shortcuts, highlighted with green and mnemonics highlighted with yellow. Firefoxshortcuts.png
Firefox 3.0 menu with shortcuts, highlighted with green and mnemonics highlighted with yellow.
Composite of two Macintosh Finder menus with keyboard shortcuts specified in the right column System 1 File Edit.png
Composite of two Macintosh Finder menus with keyboard shortcuts specified in the right column

In computing, a keyboard shortcut also known as hotkey is a series of one or several keys to quickly invoke a software program or perform a preprogrammed action. This action may be part of the standard functionality of the operating system or application program, or it may have been written by the user in a scripting language. Some integrated keyboards also include pointing devices; the definition of exactly what counts as a "key" sometimes differs.

Contents

The meaning of term "keyboard shortcut" can vary depending on software manufacturer. In Windows, hotkeys consists of a specific key combination used to trigger an action (these are usually system-wide shortcuts that are available in all contexts so long as receiving program is active); mnemonics represent a designated letter in a menu command or toolbar button that when pressed together with the Alt key, activates such command.

The term is generally associated with computer keyboards, but many electronic musical instruments now contain keyboards with advanced configuration options.

Description

Keyboard shortcuts are typically a means for invoking one or more commands using the keyboard that would otherwise be accessible only through a menu, a pointing device, different levels of a user interface, or via a command-line interface. Keyboard shortcuts are generally used to expedite common operations by reducing input sequences to a few keystrokes, hence the term "shortcut". [1]

To differentiate from general keyboard input, most keyboard shortcuts require the user to press and hold several keys simultaneously or a sequence of keys one after the other. Unmodified key presses are sometimes accepted when the keyboard is not used for general input - such as with graphics packages e.g. Adobe Photoshop or IBM Lotus Freelance Graphics. Other keyboard shortcuts use function keys that are dedicated for use in shortcuts and may only require a single keypress. For simultaneous keyboard shortcuts, one usually first holds down the modifier key(s), then quickly presses and releases the regular (non-modifier) key, and finally releases the modifier key(s). This distinction is important, as trying to press all the keys simultaneously will frequently either miss some of the modifier keys, or cause unwanted auto-repeat. Sequential shortcuts usually involve pressing and releasing a dedicated prefix key, such as the Esc key, followed by one or more keystrokes.

Mnemonics are distinguishable from keyboard shortcuts. One difference between them is that the keyboard shortcuts are not localized on multi-language software but the mnemonics are generally localized to reflect the symbols and letters used in the specific locale. In most GUIs, a program's keyboard shortcuts are discoverable by browsing the program's menus – the shortcut is indicated next to the menu choice. There are keyboards that have the shortcuts for a particular application already marked on them. These keyboards are often used for editing video, audio, or graphics, [2] as well as in software training courses. There are also stickers with shortcuts printed on them that can be applied to a regular keyboard. Reference cards intended to be propped up in the user's workspace also exist for many applications. In the past, when keyboard design was more standardized, it was common for computer books and magazines to print cards that were cut out, intended to be placed over the user's keyboard with the printed shortcuts noted next to the appropriate keys.

Customization

Visual chart of the default key assignments for the video game Vega Strike. These bindings can be reconfigured by editing the relevant XML file in a text editor. Vega strike key bindings chart.svg
Visual chart of the default key assignments for the video game Vega Strike . These bindings can be reconfigured by editing the relevant XML file in a text editor.

When shortcuts are referred to as key bindings, it carries the connotation that the shortcuts are customizable to a user's preference and that program functions may be 'bound' to a different set of keystrokes instead of or in addition to the default. [3] This highlights a difference in philosophy regarding shortcuts. Some systems, typically end-user-oriented systems such as Mac OS or Windows, consider standardized shortcuts essential to the environment's ease of use. In these commercial proprietary systems, the ability to change the default bindings and add custom ones can be limited, possibly even requiring a separate or third-party utility to perform the task, sometimes with workarounds like key remapping. In macOS, user can customize app shortcuts ("Key equivalents") in system settings, and customize text editing shortcuts by creating and editing related configuration files. [4] Other systems, typically Unix and related, consider shortcuts to be a user's prerogative, and that they should be customizable to suit individual preference. In most real-world environments, both philosophies co-exist; a core set of sacred shortcuts remain fixed while others, typically involving an otherwise unused modifier key or keys, are under the user's control.

The motivations for customizing key bindings vary. Users new to a program or software environment may customize the new environment's shortcuts to be similar to another environment with which they are more familiar. [5] More advanced users may customize key bindings to better suit their workflow, adding shortcuts for their commonly used actions and possibly deleting or replacing bindings for less-used functions. [6] Hardcore gamers often customize their key bindings in order to increase performance via faster reaction times.

"Sacred" keybindings

The original Macintosh User Interface Guidelines defined a set of keyboard shortcuts that would remain consistent across application programs. [7] This provides a better user experience than the then-prevalent situation of applications using the same keys for different functions. This could result in user errors if one program used ⌘ Command +D to mean Delete while another used it to Duplicate an item. The standard bindings were:

Later environments such as Microsoft Windows retain some of these bindings, while adding their own from alternate standards like Common User Access. The shortcuts on these platforms (or on macOS) are not as strictly standardized across applications as on the early Macintosh user interface, where if a program did not include the function normally carried out by one of the standard keystrokes, guidelines stated that it should not redefine the key to do something else as it would potentially confuse users. [9]

Notation

The simplest keyboard shortcuts consist of only one key. For these, one generally just writes out the name of the key, as in the message "Press F1 for Help". The name of the key is sometimes surrounded in brackets or similar characters. For example: [F1] or <F1>. The key name may also be set off using special formatting (bold, italic, all caps, etc.)

Many shortcuts require two or more keys to be pressed simultaneously. For these, the usual notation is to list the keys names separated by plus signs or hyphens. For example: "Ctrl+C", "Ctrl-C", or " Ctrl + C ". The Ctrl key is sometimes indicated by a caret character (^). Thus Ctrl-C is sometimes written as ^C. At times, usually on Unix platforms, the case of the second character is significant – if the character would normally require pressing the Shift key to type, then the Shift key is part of the shortcut e.g. '^C' vs. '^c' or '^%' vs. '^5'. ^% may also be written " Ctrl +Shift +5".

Some keyboard shortcuts, including all shortcuts involving the Esc key, require keys (or sets of keys) to be pressed individually, in sequence. These shortcuts are sometimes written with the individual keys (or sets) separated by commas or semicolons. The Emacs text editor uses many such shortcuts, using a designated set of "prefix keys" such as Ctrl + C or Ctrl + X . Default Emacs keybindings include Ctrl + X Ctrl + S to save a file or Ctrl + X Ctrl + B to view a list of open buffers. Emacs uses the letter C to denote the Ctrl key, the letter S to denote the Shift key, and the letter M to denote the Meta key (commonly mapped to the Alt key on modern keyboards.) Thus, in Emacs parlance, the above shortcuts would be written C-x C-s and C-x C-b. A common backronym for Emacs is "Escape Meta Alt Ctrl Shift", poking fun at its use of many modifiers and extended shortcut sequences.

See also

Notes and references

  1. Technical note: it calls the AppKit method "cancelOperation:"
  1. In the English language a "shortcut" may unintentionally suggest an incomplete or sloppy way of completing something. Consequently, some computer applications designed to be controlled mainly by the keyboard, such as Emacs, use the alternative term "key binding".
  2. Lowensohn, Josh (3 December 2009). "Hardware for Gmail: The 'Gboard' keyboard". CNET.com. Archived from the original on 16 October 2013. Retrieved 7 January 2011.
  3. "GNU Emacs Manual: Commands". Emacs does not assign meanings to keys directly. Instead, Emacs assigns meanings to named commands, and then gives keys their meanings by binding them to commands.
  4. "Text System Defaults and Key Bindings". Apple Developer Documentation Archive. September 9, 2013. Archived from the original on March 10, 2024. Retrieved 2024-01-18.
  5. Cohen, Sandee (2002). Macromedia FreeHand 10 for Windows and Macintosh. ISBN   9780201749656.
  6. "Customizing your keyboard shortcuts".
  7. Apple (November 1992). Macintosh Human Interface Guidelines (PDF). Reading, Massachusetts: Addison-Wesley. p. 128. ISBN   0-201-62216-5.
  8. "Definition of QUESTION". www.merriam-webster.com.
  9. "OS X Human Interface Guidelines". If your app does not perform the task associated with a recommended shortcut, think very carefully before you consider overriding it. Remember that although reassigning an unused shortcut might make sense in your app, your users are likely to know and expect the original, established meaning.

Related Research Articles

<span class="mw-page-title-main">Context menu</span> User interface element

A context menu is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right-click mouse operation. A context menu offers a limited set of choices that are available in the current state, or context, of the operating system or application to which the menu belongs. Usually the available choices are actions related to the selected object. From a technical point of view, such a context menu is a graphical control element.

The keyboard for IBM PC-compatible computers is standardized. However, during the more than 30 years of PC architecture being frequently updated, many keyboard layout variations have been developed.

In computing, a modifier key is a special key on a computer keyboard that temporarily modifies the normal action of another key when pressed together. By themselves, modifier keys usually do nothing; that is, pressing any of the ⇧ Shift, Alt, or Ctrl keys alone does not (generally) trigger any action from the computer.

Cut, copy, and paste are essential commands of modern human–computer interaction and user interface design. They offer an interprocess communication technique for transferring data through a computer's user interface. The cut command removes the selected data from its original position, and the copy command creates a duplicate; in both cases the selected data is kept in temporary storage called the clipboard. Clipboard data is later inserted wherever a paste command is issued. The data remains available to any application supporting the feature, thus allowing easy data transfer between applications.

<span class="mw-page-title-main">Control key</span> Key on computer keyboards

In computing, a Control keyCtrl is a modifier key which, when pressed in conjunction with another key, performs a special operation. Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. The Control key is located on or near the bottom left side of most keyboards, with many featuring an additional one at the bottom right.

<span class="mw-page-title-main">Function key</span> Key on a computer or terminal keyboard

A function key is a key on a computer or terminal keyboard that can be programmed to cause the operating system or an application program to perform certain actions, a form of soft key. On some keyboards/computers, function keys may have default actions, accessible on power-on.

<span class="mw-page-title-main">Text-based user interface</span> Type of interface based on outputting to or controlling a text display

In computing, text-based user interfaces (TUI), is a retronym describing a type of user interface (UI) common as an early form of human–computer interaction, before the advent of bitmapped displays and modern conventional graphical user interfaces (GUIs). Like modern GUIs, they can use the entire screen area and may accept mouse and other inputs. They may also use color and often structure the display using box-drawing characters such as ┌ and ╣. The modern context of use is usually a terminal emulator.

<span class="mw-page-title-main">Alt key</span> Computer key

The Alt keyAlt on a computer keyboard is used to change (alternate) the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing A will type the letter 'a', but holding down the Alt key while pressing A will cause the computer to perform an Alt+A function, which varies from program to program. The international standard ISO/IEC 9995-2 calls it Alternate key. The key is located on either side of the space bar, but in non-US PC keyboard layouts, rather than a second Alt key, there is an 'Alt Gr' key to the right of the space bar. Both placements are in accordance with ISO/IEC 9995-2. With some keyboard mappings, the right Alt key can be reconfigured to function as an AltGr key although not engraved as such.

Common User Access (CUA) is a standard for user interfaces to operating systems and computer programs. It was developed by IBM and first published in 1987 as part of their Systems Application Architecture. Used originally in the MVS/ESA, VM/CMS, OS/400, OS/2 and Microsoft Windows operating systems, parts of the CUA standard are now implemented in programs for other operating systems, including variants of Unix. It is also used by Java AWT and Swing.

The Command key, , formerly also known as the Apple key or open Apple key, is a modifier key present on Apple keyboards. The Command key's purpose is to allow the user to enter keyboard commands in applications and in the system. An "extended" Macintosh keyboard—the most common type—has two command keys, one on each side of the space bar; some compact keyboards have one only on the left.

<span class="mw-page-title-main">AutoHotkey</span> Automation-focused scripting language for Windows

AutoHotkey is a free and open-source custom scripting language for Microsoft Windows, primarily designed to provide easy keyboard shortcuts or hotkeys, fast macro-creation and software automation to allow users of most computer skill levels to automate repetitive tasks in any Windows application. It can easily extend or modify user interfaces. The installation package includes an extensive help file; web-based documentation is also available.

<span class="mw-page-title-main">Compose key</span> Computer key to initiate glyph merger

A compose key is a key on a computer keyboard that indicates that the following keystrokes trigger the insertion of an alternate character, typically a precomposed character or a symbol.

<span class="mw-page-title-main">Arrow keys</span> Set of keys on a typical computer keyboard

Arrow keys or cursor movement keys are keys on a computer keyboard that are either programmed or designated to move the cursor in a specified direction.

GNU Readline is a software library that provides in-line editing and history capabilities for interactive programs with a command-line interface, such as Bash. It is currently maintained by Chet Ramey as part of the GNU Project.

<span class="mw-page-title-main">Esc key</span> Computer key

On computer keyboards, the Esc keyEsc is a key used to generate the escape character. The escape character, when sent from the keyboard to a computer, often is interpreted by software as "stop", "cancel" or "exit", and when sent from the computer to an external device marks the beginning of an escape sequence to specify operating modes or characteristics generally.

In computing, a keyboard shortcut is a sequence or combination of keystrokes on a computer keyboard which invokes commands in software.

Control-C is a common computer command. It is generated by pressing the C key while holding down the Ctrl key on most computer keyboards.

Super key (❖) is an alternative and older name for what is commonly labelled as the Windows key or Command key on modern keyboards, typically bound and handled as such by Linux and BSD operating systems and software today.

<span class="mw-page-title-main">Unicode input</span> Input characters using their Unicode code points

Unicode input is the insertion of a specific Unicode character on a computer by a user; it is a common way to input characters not directly supported by a physical keyboard. Unicode characters can be produced either by selecting them from a display or by typing a certain sequence of keys on a physical keyboard. In addition, a character produced by one of these methods in one web page or document can be copied into another. In contrast to ASCII's 96 element character set, Unicode encodes hundreds of thousands of graphemes (characters) from almost all of the world's written languages and many other signs and symbols besides.

Emacs, originally named EMACS, is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, self-documenting, real-time display editor". Development of the first Emacs began in the mid-1970s, and work on GNU Emacs, directly descended from the original, is ongoing; its latest version is 29.2, released January 2024.