Context menu
A context menu is a menu in a graphical user interface 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.
History
Context menus first appeared in the Smalltalk environment on the Xerox Alto computer, where they were called pop-up menus; they were invented by Dan Ingalls in the mid-1970s.Microsoft Office v3.0 introduced the context menu for copy and paste functionality in 1990. Borland demonstrated extensive use of the context menu in 1991 at the Second Paradox Conference in Phoenix Arizona. Lotus 1-2-3/G for OS/2 v1.0 added additional formatting options in 1991. Borland Quattro Pro for Windows v1.0 introduced the Properties context menu option in 1992.
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 Windows, macOS, or Unix running the X Window System, clicking the secondary mouse button opens a context menu for the region that is under the mouse pointer.
- For quickness, implementations may additionally support hold-and-release selection, meaning the pointer is held down and dragged, and released at desirable menu entry.
- On systems that support one-button mice, context menus are typically opened by pressing and holding the primary mouse button or by pressing a keyboard/mouse button combination. A keyboard alternative for macOS is to enable Mouse keys in Universal Access. Then, depending on whether a laptop or compact or extended keyboard type is used, the shortcut is ++5 or +5 or ++i.
- On systems with a multi-touch interface such as MacBook or Surface, the context menu can be opened by pressing or tapping with two fingers instead of just one.
- Some cameras on smartphones for example recognize a QR code when a picture is taken. Then a pop-up appears if you want to 'open' the QR content. This could be anything like a website or to configure your phone to connect to Wi-Fi.
- On some user interfaces, context menu items are accompanied by icons for quicker recognition upon navigation.
- Context menus can also have a top row of icons only for quick access to most frequently used options.
- In Microsoft Windows, pressing the Application key or Shift+F10 opens a context menu for the region that has focus.
X Window Managers
The following window managers provide context menu functionality:- Awesome
- IceWM—middle-click and right-click context menus on desktop, menu bar, title bars, and title icon
- olwm
- openbox
- sawfish
Usability
Context menus have received some criticism from usability analysts when improperly used, as some applications make certain features only available in context menus, which may confuse even experienced users.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 near the focused widget instead of the position of the pointer, to save recognition efforts.