Context menu
Encyclopedia
A context menu is a menu
in a graphical user interface
(GUI) that appears upon user interaction, such as a right mouse click or middle 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. Usually the available choices are actions related to the selected object
.
environment on the Xerox Alto
computer, where they were called pop-up menus. The NEXTSTEP
operating system further developed the idea, incorporating a feature whereby the right or middle mouse button brought the main menu (which was vertical and automatically changed depending on context) to the location of the mouse, thereby eliminating the need to move the mouse pointer all the way across the large (for the time) NextStep screen.
Context menus are sometimes hierarchically organized, allowing navigation through different levels of the menu structure. The implementations differ: Microsoft Word
was one of the first applications to only show sub-entries of some menu entries after clicking an arrow icon on the context menu, otherwise executing an action associated with the parent entry. This makes it possible to quickly repeat an action with the parameters of the previous execution, and to better separate options from actions.
s provide context menu functionality:
analysts when improperly used, as some applications make certain features only available in context menus, which may confuse even experienced users (especially when the context menus can only be activated in a limited area of the application's client window).
Context menus usually open in a fixed position under the pointer, but when the pointer is near a screen edge the menu will be displaced - thus reducing consistency and impeding use of muscle memory
. If the context menu is being triggered by keyboard, such as by using Shift + F10, the context menu appears instead near the focused widget instead of the position of the pointer, to save recognition efforts.
Menu (computing)
In computing and telecommunications, a menu is a list of commands presented to an operator by a computer or communications system. A menu is used in contrast to a command-line interface, where instructions to the computer are given in the form of commands .Choices given from a menu may be selected...
in a graphical user interface
Graphical user interface
In computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...
(GUI) that appears upon user interaction, such as a right mouse click or middle 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. Usually the available choices are actions related to the selected object
Selection (user interface)
In computing and user interface engineering, a selection is a list of items on which user operations will take place. The user typically adds items to the list manually, although the computer may create a selection automatically. A precision pointing device or by hand on a touchscreen device is...
.
History
Context menus first appeared in the SmalltalkSmalltalk
Smalltalk is an object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis." It was designed and created in part for educational use, more so for constructionist...
environment on the Xerox Alto
Xerox Alto
The Xerox Alto was one of the first computers designed for individual use , making it arguably what is now called a personal computer. It was developed at Xerox PARC in 1973...
computer, where they were called pop-up menus. The NEXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...
operating system further developed the idea, incorporating a feature whereby the right or middle mouse button brought the main menu (which was vertical and automatically changed depending on context) to the location of the mouse, thereby eliminating the need to move the mouse pointer all the way across the large (for the time) NextStep screen.
Implementation
Context menus are opened via various forms of user interaction that target a region of the GUI that supports context menus. The specific form of user interaction and the means by which a region is targeted vary:- On a computer running Microsoft WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, Mac OS XMac OS XMac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, or UnixUnixUnix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
running the X Window SystemX Window SystemThe X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...
, clicking the secondary mouse button (usually the right button) opens a context menu for the region that is under the mouse pointer. - On systems that support one-button mice, context menus are typically opened by pressing and holding the primary mouse button (this works on the icons in the Dock on Mac OS XMac OS XMac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
) or by pressing a keyboard/mouse button combination (e.g. Ctrl-mouse click in Mac OSMac OSMac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...
). A keyboard alternative for Mac OS is to enable Mouse keysMouse keysMouse keys is a feature of some graphical user interfaces that uses the keyboard as a pointing device...
in Universal AccessUniversal AccessApple Universal Access is a component of the Mac OS X operating system that provides computing abilities to the blind, deaf, and handicapped.- Components :Universal Access is a preference pane of the System Preferences application...
. Then, depending on whether a laptop or compact or extended keyboard type is used, the shortcut is ++5 or +5 (numeric keypad) or ++i (laptop). - In Microsoft Windows, pressing the Application keyMenu keyIn computing, the Menu key or Application key is a key found on Microsoft Windows-oriented computer keyboards. Its symbol is a small icon depicting a cursor hovering above a menu...
or Shift+F10 opens a context menu for the region that has focusFocus (computing)In computing, the focus indicates the component of the graphical user interface which is currently selected to receive input. Text entered at the keyboard or pasted from a clipboard is sent to the component which currently has the focus. Moving the focus away from a specific user interface element...
.
Context menus are sometimes hierarchically organized, allowing navigation through different levels of the menu structure. The implementations differ: Microsoft Word
Microsoft Word
Microsoft Word is a word processor designed by Microsoft. It was first released in 1983 under the name Multi-Tool Word for Xenix systems. Subsequent versions were later written for several other platforms including IBM PCs running DOS , the Apple Macintosh , the AT&T Unix PC , Atari ST , SCO UNIX,...
was one of the first applications to only show sub-entries of some menu entries after clicking an arrow icon on the context menu, otherwise executing an action associated with the parent entry. This makes it possible to quickly repeat an action with the parameters of the previous execution, and to better separate options from actions.
X Window Managers
The following window managerWindow manager
A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment...
s provide context menu functionality:
- 9wm9wm9wm is an Open Source stacking window manager for X11, written by David Hogan in 1994 to emulate the Plan 9 SecondEdition window manager, 8½...
- icewmIceWMIceWM is a stacking window manager for the X Window System graphical infrastructure, written by Marko Maček. It was coded from scratch in C++ and is released under the terms of the GNU Lesser General Public License...
- middleclick and rightclick context menus on desktopDesktop environmentIn graphical computing, a desktop environment commonly refers to a style of graphical user interface derived from the desktop metaphor that is seen on most modern personal computers. These GUIs help the user in easily accessing, configuring, and modifying many important and frequently accessed...
, menubar. titlebars, and titleicon - olwmOlwmolwm was the default stacking window manager for OpenWindows, the original desktop environment included with SunOS and Solaris...
- openboxOpenboxOpenbox is a free window manager for the X Window System, licensed under the GNU General Public License. Originally derived from Blackbox 0.65.0 , Openbox has now been totally rewritten in the C programming language and since version 3.0 is not based upon any code from Blackbox.Openbox is designed...
- sawfishSawfish (window manager)Sawfish is an extensible window manager for the X Window System. Its aim is simply to manage windows in the most flexible and attractive manner possible. Formerly known as Sawmill, the name was changed because another software program had the same name....
Usability
Context menus have received some criticism from usabilityUsability
Usability is the ease of use and learnability of a human-made object. The object of use can be a software application, website, book, tool, machine, process, or anything a human interacts with. A usability study may be conducted as a primary job function by a usability analyst or as a secondary job...
analysts when improperly used, as some applications make certain features only available in context menus, which may confuse even experienced users (especially when the context menus can only be activated in a limited area of the application's client window).
Context menus usually open in a fixed position under the pointer, but when the pointer is near a screen edge the menu will be displaced - thus reducing consistency and impeding use of muscle memory
Muscle memory
Muscle memory has been used synonymously with motor learning, which is a form of procedural memory that involves consolidating a specific motor task into memory through repetition. When a movement is repeated over time, a long-term muscle memory is created for that task, eventually allowing it to...
. If the context menu is being triggered by keyboard, such as by using Shift + F10, the context menu appears instead near the focused widget instead of the position of the pointer, to save recognition efforts.