A keyboard shortcut is a key or combination of keys that are pressed to invoke a command on a computer. Specifically, keyboard shortcuts are generally related to graphical user interface commands. For example, under OS X, programs are closed by selecting the "Quit" command from the application menu. The shortcut for this is command+Q, in other words, hold down the command key and press Q.
Keyboard shortcuts in most cases are differentiated from typographic keystrokes by way of modifier keys. By holding down one or more specific modifier keys, the following keystroke invokes a command instead of typing a character. Common examples include alt+F4 (close window in Microsoft Windows) and control+P or command+P for print.
Keyboard shortcuts can use as many as three or more simultaneous modifier keys in addition to a typographic key. Keyboards with two-key rollover must ensure that the keyboard matrix has dedicated lines to the modifier keys so that all the modifier keys on one side of the keyboard can be held at once; older PC keyboards that predate widespread use of graphical operating systems, such as the Tulip ATK 030244, block many three-key shortcut combinations as part of the standard blocking approach.
Command line interfaces also make heavy use of invocations involving the control key, but as these are generally only two-key combinations (for example control+C to cancel a running program), they do not present the same challenge to matrix wiring as the complex shortcuts used in graphical desktops.