Alt-Tab
   HOME

TheInfoList



OR:

is the common name for a
keyboard shortcut 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 ...
that has been in Microsoft Windows since Windows 2.0 (1987). This shortcut switches between application-level
windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
without using the mouse; hence it was named ''Task Switcher'' (''Flip'' in
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
). orders windows by most recently used, thus repeated keystrokes will switch between the two most recent tasks. It can also be used alternate between a full-size window and the desktop. The window environment maintains a
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
list of top-level windows (tasks) with the most recently used tasks at the front and the desktop at the bottom, so the most recently used tasks can be switched to the most quickly. The keyboard combination has also been incorporated in other
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s and
desktop environment In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphica ...
s such as
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-known products include the ...
, Xfce, and GNOME.
iOS iOS (formerly iPhone OS) is a mobile operating system created and developed by Apple Inc. exclusively for its hardware. It is the operating system that powers many of the company's mobile devices, including the iPhone; the term also include ...
and
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
have similar functionality by pressing but that switches ''applications'' rather than ''windows''.


Behavior

The use of the
modifier key In computing, a modifier key is a special key (or combination) 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 , ...
in using differs from typical modifier key use in the following ways: * There is a difference in behavior when the user releases and presses again vs. holding continuously while pressing repeatedly. * Releasing has an immediate effect: it closes the task switcher and switches to the selected task. There are many subtleties to the behavior of , and they have remained mostly unchanged over the years. The behavior follows these rules: * If there is more than one window, the task list appears as soon as is pressed while is being held down. * The task list remains open until is released. * moves the cursor forward in the list; moves it backward. * or will autorepeat if held down (useful if there are many windows). * With the initial press of or , the selection cursor starts on the window immediately following or immediately preceding the active one. * If there are no topmost windows above the
active window 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. They work in conjunction ...
, an initial wraps the cursor around to the end of the list. * Using the mouse to click on a task icon in the task window switches to that task (does not work on Windows XP and earlier). * Pressing or clicking the mouse outside of the task window while is still down cancels the switch. * The windows are listed by their
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
. * Any windows that are "always on top" are placed at the front of the
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
sequence, followed by the current window and the windows underneath it. * The desktop is given a window just like it was a top-level window. This no longer works on Windows 10. * Switching to a window moves it to the front of the
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
, with the exception that "always on top" windows remain topmost and at the front of the list. * When the task switcher window is not active, places the active window at the bottom of the
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
. In Windows 8 the behavior has changed: the window will be moved one level down the
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
instead of going to the end. * is equivalent to one except that minimized windows are selected without being restored. * Minimizing a window also sends it to the back of the
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
in the same way as . The rules have the following consequences: * In the absence of "always on top" windows such as Task Manager, pressing , pressing , releasing , and releasing (the typical way keyboard modifiers are used) will always alternate between the two most recent tasks. * can restore the most recently minimized window. (If there are "always on top" windows, the lowest of these will be selected instead.) * Pressing - (two tabs with continuously held down) performs the same quick switch back and forth, but between three programs. Any number of presses can be used to achieve this with any number of windows. When the task list is initially activated by pressing , the list is populated in this order: * Any always-on-top' top-level windows'' according to
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
, front-to-back. * All ''ordinary top-level windows'' according to
Z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
, front-to-back. The task list does not change order while it is open, but the order of tasks can change between invocations of the task list. Windows Vista changed the default behavior (under most default installations) with its Flip interface. The six most recently used items in the Flip order work as described, then remaining windows are ordered alphabetically by application path (and optionally grouped, depending on the 'group similar taskbar buttons' setting which is enabled by default). Windows 10 removed the desktop from the task list.


Illustrative examples

Windows may be divided into two categories, 'always-on-top' and ordinary. When a task is switched to, it is moved to the head of its category. For the following example, suppose there are no 'always-on-top' windows. Let ''A'' be the current window title. Hold down Alt and press and release Tab once, leaving Alt pressed. The window list comes up. ''A'' is guaranteed to be first in the list. Suppose the complete list is ''A W Z E U B C''. The selection cursor will initially be on ''W''. Suppose we want to switch to window ''U''. Without releasing Alt, press Tab three more times and then release Alt. Then hold down Alt and press-release Tab once leaving Alt down. The window list will now show ''U A W Z E B C''. Then Tab over to ''E'' and release Alt, selecting window ''E''. Press and hold down Alt and press-release Tab once leaving Alt down. The window list will now show ''E U A W Z B C''. Note that the windows switched to with (''E'', ''U'', ''A'') are in order of how recently they were switched to. Now Tab over to ''A'' and release Alt. Press and hold down Alt and press-release Tab leaving Alt down. The window list will show ''A E U W Z B C''. The effect of this most-recently used behavior is that to return to the most recent task, Tab is pressed once, for the second most recent task Tab is pressed twice, and so on for all tasks. The priority of a window in terms of accessibility is how recently it was used. If ''A'' is now minimized, the list will become ''E U W Z B C A'', and if ''Z'' is minimized the list becomes ''E U W B C A Z''. Thus minimizing a window mimics the effect of not using it for a long time. The commonplace alternation between the 2 most recent tasks (using a fast with all keys released immediately) is precisely a special case of the above behavior. Suppose the windows are ''A B C'' and we want to alternate between ''A'' and ''B''. Hold Alt while pressing and releasing Tab; continue holding Alt. The list will show ''A B C'' and the cursor will initially be over ''B''. When Alt is released ''B'' will be selected, Tab having been pressed a total of 1 time, and zero attention to the task selection cursor having been necessary. Again, press and release Tab while holding Alt. The list will show ''B A C'' and the cursor will initially be over ''A''. When Alt is released we have switched back to ''A''. Displaying the list again, the order has returned to ''A B C'' and this sequence can recur. On close inspection, in the course of typing and releasing both keys quickly, the task list window can be observed to flicker for a split second, so . If the user has been switching among 3 applications and wants to dispense with one of them by minimizing, one of the remaining ones will be on top immediately after minimizing, and ordinarily will alternate between the 2 remaining windows. If a program fails to move to the end of the list when minimized, pressing once will return to the minimized program. Failures such as this can result in a frenzied reordering of the list by means of several --... sequences to compensate for the program misbehavior. The algorithm for this reshuffling is intuitive after using for a long time. If the user attempts to switch to an application using but the application fails to update its place in the z-order (for example, if its window procedure is hung), then the next time is invoked, the task selection cursor may initially point unexpectedly far into the list of icons, just past the application in question, which will not have been moved to the head of the list. Applications have some say in where they are located in the order. The list of windows is altered by the creation and destruction of windows, programmatic hiding, showing, raising, and lowering of windows, and alterations to the window
z-order Z-order is an ordering of overlapping two-dimensional objects, such as Window (computing), windows in a stacking window manager, shapes in a vector graphics editor, or objects in a 3D application.Foley, James, Andries van Dam, Steven Feiner, and ...
. The order of the list corresponds directly to the z-order, once the windows have been sorted according to 'always-on-top' status. Alt-Shift-Esc is equivalent to one Alt-Shift-Tab except that minimized windows are selected without being displayed.


Windows-specific issues and hacks

works even if
Windows Explorer File Explorer, previously known as Windows Explorer, is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards. It provides a graphical user interface for accessing the file ...
is no longer running. On
Windows NT Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system. The first version of Win ...
-based systems, is managed by
CSRSS Client Server Runtime Subsystem, or csrss.exe, is a component of the Windows NT family of operating systems that provides the user mode side of the Win32 subsystem and is included in Windows NT 3.1 and later. Because most of the Win32 subsystem ope ...
(Client/Server Runtime Subsystem). It works even when and (
Task Manager In operating systems, a task manager is a system monitor program used to provide information about the processes and applications running on a computer, as well as the general status of the computer. Some implementations can also be used to t ...
) (which are managed by
Winlogon In computing, Winlogon (Windows Logon) is the component of Microsoft Windows operating systems that is responsible for handling the secure attention sequence, loading the user profile on logon, and optionally locking the computer when a screensa ...
) do not. may be intercepted (or effectively disabled) by means of a low-level keyboard hook. Such a technique is used by applications such as the
Virtual Network Computing Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse input from one computer to another, relaying the g ...
(VNC) viewer to pass keystrokes to the remote desktop when the VNC window is active. Under
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
, the Tweak UI PowerToy, can adjust the number of rows and columns in the task list window, or it can be adjusted via a registry edit. This is helpful if there are so many windows that the list would spill over into multiple pages. Another Microsoft PowerToy, Replacement, is available for Windows XP that displays a screenshot of each application in the task list rather than just its icon, and allows the user to use the mouse to select the desired application. A more advanced version of this functionality, named Windows Flip, is built into
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
. A number of third-party tools, similar to Replacement, are also available that add additional functionality to . Additionally,
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
allow the user to navigate through the menu using mouse or arrow keys. When the Aero Glass theme is enabled, Windows Vista also offers a 3D view of the windows themselves that animates as the user cycles through it. The behaviour is very similar to and is accessed by holding down the key instead of while pressing . While this view is visible, windows can be selected and made active by clicking on them with the mouse, and the list can be scrolled forward or backward using the mouse scroll wheel. If there is only one window on the system, Windows does not show a selector dialog at all when is pressed; the key sequence will simply restore or give focus to that window in case it is minimized or not focused. This means that under Windows 10, no longer functions as a way to switch out of a full-screen application, since the desktop is no longer a window. If the user prefers the smaller XP icons over the larger Vista "thumbnail" icons, they can change the functionality by: * Start → Computer * Hit the "System Properties" button (on the Toolbar under the File , Edit toolbar) * Select "Advanced System Settings" (under Tasks grouping in the left-hand column); this brings up the "System Properties" dialog box, which should show the "Advanced Tab". * Hit the Settings Button under Performance. Uncheck the "Enable Desktop Composition" checkbox (the 3rd checkbox from the top in the Custom list box). * Hit OK The user may also stop the Dwm.exe process via Windows'
Task Manager In operating systems, a task manager is a system monitor program used to provide information about the processes and applications running on a computer, as well as the general status of the computer. Some implementations can also be used to t ...
. In
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
, after a one-second delay, displays the full-sized application window immediately each time the cursor position changes, hiding all other windows. This is a part of Aero Peek feature, new in Windows 7. This behavior can be disabled along with Aero Peek: Control Panel - Performance Information and Tools - Adjust visual effects - uncheck Enable Aero Peek. Delay is adjustable by setting the LivePreview_ms value in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AltTab registry key. Some users report that the switcher dialog does not stay on top while it is displayed, but one can navigate through this dialog using mouse even if it is completely overlapped by some window. This bug is reported to be user profile specific. Some user profiles on the same machine may encounter this bug, some not. As discovered, the problem is sometimes caused by desktop gadgets system. After killing sidebar.exe process (which hosts the gadgets), the problem disappears. After restarting sidebar the problem appears again. This bug also happens when ipoint.exe, the Microsoft Intellipoint mouse driver, is running. Other programs causing this behaviour were reported as well. The actual reason this problem occurs is because ero-sized always-on-top windows at (0,0)cause Windows Explorer to set the alt-tab properties incorrectly. The solution is to download and run a program which will remove these flags. tp://ftp.cygnus-software.com/pub/AltTabFixer.zip download To show the XP icons in Windows 7 advanced users can add a new DWORD value ''AltTabSettings'' in the registry key ''HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\'' and set its value to 1. Using
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
the additional key combination brings up the switcher dialog and it remains on screen after all the keys have been released. A user can move through the dialog in any direction using the arrow keys, or through in a linear manner, wrapping at the end of the list back to the beginning. In this mode, the key or a mouse click selects the desired window which gains the focus and the dialog is dismissed; dismisses with no change of focus. In
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
, to use a switcher dialog similar to that in XP, one can keep Left- pressed, tap on Right- and then press . There is a common problem associated with the use of . It is very easy for the user to mistakenly use instead, changing the system language through the use of a default keybind. To solve this issue, go into Control Panel/Regional Settings/Languages/Details and there is a button that allows the user to configure the shortcuts to switch languages - he/she can disable it or change it to something harder to press by mistake. This problem is reported on Windows XP and Windows 7.


Non-Windows functionality


macOS

Similar functionality exists on
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
using instead of , and switching between applications rather than windows. The Mac's switcher has the additional capabilities of pointing at the desired icon with the mouse (also present in Windows Vista and above), and dropping files on applications' icons. Selected application can be hidden or closed using or keys without closing the menu. works similarly to switch between windows within the same application. Once has been invoked, changes behavior to mimic (i.e. it cycles backwards). Using or allows the user to select the window to focus on. The and arrow keys may also be used to navigate the application switcher. This functionality does not automatically restore windows from an application in which all windows been minimized. To restore a window, one needs to press as many times as necessary to choose the desired application, and hold the
Option key The Option key, , is a modifier key present on Apple keyboards. It is located between the Control key and Command key on a typical Mac keyboard. There are two Option keys on modern (as of 2020) Mac desktop and notebook keyboards, one on each sid ...
just prior to releasing the Command button. This will restore the most relevant window in the application. There was no default
key binding 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 ...
for application switching in Classic Mac OS. Third party control panels (such as ''ApplWindows'' and ''LiteSwitch'') provided this behavior.


iOS

iOS adds comparable functionality using instead of , as with macOS. The iOS switcher allows the user to move between recently used applications (nine in landscape, six in portrait), as opposed to "open" applications, since the concept of an open application is considerably less clear on iOS than other desktop operating systems. cycles backwards, as in OS X.


Unix

Unix-like desktop systems such as
fvwm The F Virtual Window Manager is a virtual window manager for the X Window System. Originally a twm derivative, FVWM has evolved into a powerful and highly configurable environment for Unix-like systems. History In 1993, during his work analyzi ...
,
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that allow collaborative work on this kind of software. Well-known products include the ...
, Xfce, and GNOME have added a compatible function. On some systems including Sun's CDE and old versions of
fvwm The F Virtual Window Manager is a virtual window manager for the X Window System. Originally a twm derivative, FVWM has evolved into a powerful and highly configurable environment for Unix-like systems. History In 1993, during his work analyzi ...
, the key combination is mapped to less sophisticated functionality such as only alternating between two windows, cycling forward or backward in a list of all windows in a fixed order, or opening a task applet in which one has to use arrow keys or the mouse to select a task and then click or push Enter. Some window managers such as WindowLab forego the onscreen window list and simply bring each window to the front in turn as is pressed. Not all window managers provide this functionality as a core feature. For example,
Blackbox In Unix computing, Blackbox is a free and open-source stacking window manager for the X Window System. Blackbox has specific design goals, and some functionality is provided only through other applications. One example is the bbkeys hotkey a ...
does not; users desiring this behavior can add it by running a helper application such as ''bbkeys''.


Compiz Fusion

Compiz Fusion Compiz () is a compositing window manager for the X Window System, using 3D graphics hardware to create fast compositing desktop effects for window management. Effects, such as a minimization animation or a cube workspace, are implemented as lo ...
(aka Beryl (window manager), Beryl, Compiz) has similar functionality, but displays a preview of the window as well as its icon (Present in Windows Vista and above, with DWM enabled). It also makes use of Alt-Shift-Tab by moving backwards through the displayed programs, and it is possible to activate a Windows Flip 3D alternative using the Windows key and Tab.


GNOME

The Metacity window manager has similar functionality to versions of Windows released before Vista, but it only displays the outline of the currently selected window on the screen. Windows, on the other hand shows the whole selected window, which helps the user to pick the correct window from multiple windows with a similar title or icon.


History

The key combination to switch between windows has been present in all versions of Windows since Windows 1.0. However, there was no visual indication of the list of windows available when switching between windows until Windows 3.1x, Windows 3.1, when this feature was introduced as the 'Fast "Alt+TAB" Switching' checkbox in the Display control panel applet, internally known as "CoolSwitch".Windows 3.1 Resource Kit WIN.INI Section Settings
/ref> Before CoolSwitch, the combination was similar to the combination (which also switched windows), but redrew each window immediately on each stroke, while brought the windows to the top but did not redraw them until the Alt key was released.


Inconsistency

An example of a program that violates the expectation that pressing one time will switch to the previous application is Adobe Reader 7.0.x. Like newer versions of Microsoft Word it attempts to give a separate icon in the task menu to each Multiple document interface, MDI document. However, unlike Word, it brings two items to the front of the list whenever a document is selected using : first an icon representing the main Reader window and then an icon for the individual document. While in Adobe Reader, pressing one time selects the second item in the list, which is the icon for the PDF document. Adobe Reader remains the current task when is released. Thus it is demonstrated that the correct operation of {{key press, Alt, Tab, like some other aspects of the Windows environment such as the Clipboard (software), Clipboard chain, depends on individual applications being written correctly.


See also

*Table of keyboard shortcuts *Windows Alt keycodes *Task manager *MultiFinder


References


External links


Raymond Chen, The Old New Thing: What is the Alt+Tab order?
User interface techniques Windows administration MacOS user interface