A context menu (also called contextual, shortcut, and popup or pop-up menu) is a menu in a graphical user interface (GUI) that appears upon user interaction, such as a right mouse click. A context menu offers a limited set of choices that are available in the current state, or context, of the operating system or application.
Context menus first appeared in the Smalltalk 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 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, Mac OS X, or Unix running the X Window System, 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 X) or by pressing a keyboard/mouse button combination (e.g. Ctrl-mouse click in Mac OS)
- In Microsoft Windows, pressing the Application key or Shift+F10 opens a context menu for the region that has focus.
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.
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 (especially when the context menus can only be activated in a limited area of the application's client window).
Microsoft's guidelines call for using the term context menu only in programming and other technical documentation, while using shortcut menu in user documentation.