Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Alt-Tab

From Wikipedia, the free encyclopedia
Keyboard shortcut to switch windows without using a mouse
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Alt-Tab" – news ·newspapers ·books ·scholar ·JSTOR
(May 2011) (Learn how and when to remove this message)

Alt+Tab is the common name for akeyboard shortcut that has been inMicrosoft Windows sinceWindows 1.0 (1985). This shortcut switches between application-levelwindows without using the mouse; hence it was namedTask Switcher (Flip inWindows Vista).

Alt+Tab ↹ orders windows bymost recently used, thus repeatedAlt+Tab ↹ 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 aZ-order 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.

TheAlt+Tab ↹ keyboard combination has also been incorporated in otheroperating systems anddesktop environments such asKDE,Xfce, andGNOME.iOS andmacOS have similar functionality by pressingCommand+Tab ↹ but that switchesapplications rather thanwindows.

Behavior

[edit]

The use of themodifier keyAlt in usingAlt+Tab ↹ differs from typical modifier key use in the following ways:

  • There is a difference in behavior when the user releasesAlt and pressesAlt+Tab ↹ again vs. holdingAlt continuously while pressingTab ↹ repeatedly.
  • ReleasingAlt has an immediate effect: it closes the task switcher and switches to the selected task.

There are many subtleties to the behavior ofAlt+Tab ↹, 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 asTab ↹ is pressed whileAlt is being held down.
  • The task list remains open untilAlt is released.
  • Tab ↹ moves the cursor forward in the list;⇧ Shift+Tab ↹ moves it backward.
  • Tab ↹ or⇧ Shift+Tab ↹ willautorepeat if held down (useful if there are many windows).
  • With the initial press ofTab ↹ or⇧ Shift+Tab ↹, the selection cursor starts on the window immediately following or immediately preceding the active one.
  • If there are no topmost windows above theactive window, an initial⇧ Shift+Tab ↹ 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).
  • PressingEsc or clicking the mouse outside of the task window whileAlt is still down cancels the switch.
  • The windows are listed by theirZ-order.
  • Any windows that are "always on top" are placed at the front of theZ-order 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 theZ-order, with the exception that "always on top" windows remain topmost and at the front of the list.
  • When theAlt+Tab ↹ task switcher window is not active,Alt+Esc places the active window at the bottom of theZ-order. InWindows 8 the behavior has changed: the window will be moved one level down theZ-order instead of going to the end.
  • Alt+⇧ Shift+Esc is equivalent to oneAlt+⇧ Shift+Tab ↹ except that minimized windows are selected without being restored.
  • Minimizing a window also sends it to the back of theZ-order in the same way asAlt+Esc.

The rules have the following consequences:

  • In the absence of "always on top" windows such as Task Manager, pressingAlt, pressingTab ↹, releasingTab ↹, and releasingAlt (the typical way keyboard modifiers are used) will always alternate between the two most recent tasks.
  • Alt+⇧ Shift+Tab ↹ can restore the most recently minimized window. (If there are "always on top" windows, the lowest of these will be selected instead.)
  • PressingAlt+Tab ↹-Tab ↹ (two tabs withAlt continuously held down) performs the same quick switch back and forth, but between three programs. Any number ofTab ↹ presses can be used to achieve this with any number of windows.

When the task list is initially activated by pressingAlt+Tab ↹, the list is populated in this order:

  • Any 'always-on-top' top-level windows according toZ-order, front-to-back.
  • Allordinary top-level windows according toZ-order, 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[1] (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

[edit]

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. LetA 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 isA W Z E U B C. The selection cursor will initially be onW. Suppose we want to switch to windowU. 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 showU A W Z E B C. Then Tab over toE and release Alt, selecting windowE. Press and hold down Alt and press-release Tab once leaving Alt down. The window list will now showE U A W Z B C. Note that the windows switched to withAlt+Tab ↹ (E,U,A) are in order of how recently they were switched to. Now Tab over toA and release Alt. Press and hold down Alt and press-release Tab leaving Alt down. The window list will showA 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 ofAlt+Tab ↹ accessibility is how recently it was used. IfA is now minimized, the list will becomeE U W Z B C A, and ifZ is minimized the list becomesE 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 fastAlt+Tab ↹ with all keys released immediately) is precisely a special case of the above behavior. Suppose the windows areA B C and we want to alternate betweenA andB. Hold Alt while pressing and releasing Tab; continue holding Alt. The list will showA B C and the cursor will initially be overB. When Alt is releasedB 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 showB A C and the cursor will initially be overA. When Alt is released we have switched back toA. Displaying the list again, the order has returned toA B C and this sequence can recur. On close inspection, in the course of typingAlt+Tab ↹ 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 ordinarilyAlt+Tab ↹ will alternate between the 2 remaining windows. If a program fails to move to the end of the list when minimized, pressingAlt+Tab ↹ once will return to the minimized program. Failures such as this can result in a frenzied reordering of theAlt+Tab ↹ list by means of severalAlt+Tab ↹-Tab ↹-Tab ↹... 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 usingAlt+Tab ↹ but the application fails to update its place in the z-order (for example, if its window procedure is hung), then the next timeAlt+Tab ↹ 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 theAlt+Tab ↹ 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 windowz-order.[2]

The order of theAlt+Tab ↹ 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.[3]

Windows-specific issues and hacks

[edit]

Alt+Tab ↹ works even ifWindows Explorer is no longer running. OnWindows NT 3.51 and prior,Alt+Tab ↹ is managed byCSRSS (Client/Server Runtime Subsystem). OnWindows NT 4.0 and later, it's handled by the kernel modewindowing system driver (win32k.sys).[4] It works even whenCtrl+Alt+Del andCtrl+⇧ Shift+Esc (Task Manager) (which are managed byWinlogon) do not.[5]

Alt+Tab ↹ may be intercepted (or effectively disabled) by means of a low-level keyboard hook.[6] Such a technique is used by applications such as theVirtual Network Computing (VNC) viewer to passAlt+Tab ↹ keystrokes to the remote desktop when the VNC window is active.

UnderWindows XP, theTweak UI PowerToy,[7] can adjust the number of rows and columns in the task list window, or it can be adjusted via a registry edit.[8] This is helpful if there are so many windows that the list would spill over into multiple pages.

Another Microsoft PowerToy,Alt+Tab ↹ Replacement,[7] is available for Windows XP that displays ascreenshot 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 intoWindows Vista.

A number of third-party tools, similar toAlt+Tab ↹ Replacement, are also available that add additional functionality toAlt+Tab ↹.

Additionally,Windows Vista andWindows 7 allow the user to navigate through theAlt+Tab ↹ 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 toAlt+Tab ↹ and is accessed by holding down the⊞ Win key instead ofAlt while pressingTab ↹. 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 whenAlt+Tab ↹ 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,Alt+Tab ↹ 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 theDwm.exe process via Windows'Task Manager.

InWindows 7Alt+Tab ↹, 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[9][10] 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.[11]

The actual reason this problem occurs is because [zero-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.[12]download[dead link]

To show the XP icons in Windows 7 advanced users can add a new DWORD valueAltTabSettings in the registry keyHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\and set its value to 1.

UsingWindows 7 the additional key combinationCtrl+Alt+Tab ↹ 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, orTab ↹ through in a linear manner, wrapping at the end of the list back to the beginning. In this mode, the↵ Enter key or a mouse click selects the desired window which gains the focus and the dialog is dismissed;Esc dismisses with no change of focus.

InWindows 7, to use a switcher dialog similar to that in XP, one can keep Left-Alt pressed, tap on Right-Alt and then pressTab ↹.

There is a common[13][14] problem associated with the use ofAlt+Tab ↹. It is very easy for the user to mistakenly useAlt+⇧ Shift 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

[edit]
Command Tab switcher onmacOS Big Sur

macOS

[edit]

Similar functionality exists onmacOS usingCommand instead ofAlt, 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 usingH orQ keys without closing the menu.⌘ Command+` works similarly to switch between windows within the same application. Once⌘ Command+Tab ↹ has been invoked,⌘ Command+` changes behavior to mimic⌘ Command+⇧ Shift+Tab ↹ (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⌘ Command+Tab ↹ as many times as necessary to choose the desired application, and hold theOption key just prior to releasing the Command button. This will restore the most relevant[citation needed] window in the application.

There was no defaultkey binding for application switching inClassic Mac OS. Third partycontrol panels (such asApplWindows andLiteSwitch) provided this behavior.

Command Tab switcher iniOS

iOS

[edit]

iOS adds comparable functionality usingCommand instead ofAlt, 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.⌘ Command+⇧ Shift+Tab ↹ cycles backwards, as in OS X.

Unix

[edit]

Unix-like desktop systems such asfvwm,KDE,Xfce, andGNOME have added a compatible function. On some systems including Sun'sCDE and old versions offvwm, theAlt+Tab ↹ 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 asWindowLab forego the onscreen window list and simply bring each window to the front in turn asAlt+Tab ↹ is pressed.

Not all window managers provide this functionality as a core feature. For example,Blackbox does not; users desiring this behavior can add it by running a helper application such asbbkeys.

Flip Switcher inCompiz Fusion

Compiz Fusion

[edit]

Compiz Fusion (akaBeryl,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 WindowsFlip 3D alternative using theWindows key and Tab.

GNOME

[edit]

TheMetacity 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

[edit]

TheAlt+Tab ↹ key combination to switch between windows has been present in all versions of Windows sinceWindows 1.0.[15] Originally, theAlt+Tab ↹ combination was similar to theAlt+Esc combination (which also switched windows), butAlt+Esc redrew each window immediately on each stroke, whileAlt+Tab ↹ brought the windows to the top but did not redraw them until the Alt key was released.

The feature evolved inWindows 3.1, when the first visual switcher was introduced as the 'Fast "Alt+TAB" Switching' checkbox in the Desktop control panel applet, internally known as "CoolSwitch".[16] However, this treatment only showed the currently selected window, not giving the user a hint of what will happen with each subsequent press of the key.

The current “strip” version of switching that shows all the apps in one row, was first introduced inWindows 95.

Inconsistency

[edit]

An example of a program that violates the expectation that pressingAlt+Tab ↹ one time will switch to the previous application isAdobe Reader 7.0.x. Like newer versions ofMicrosoft Word it attempts to give a separate icon in theAlt+Tab ↹ task menu to eachMDI document. However, unlike Word, it brings two items to the front of the list whenever a document is selected usingAlt+Tab ↹: first an icon representing the main Reader window and then an icon for the individual document. While in Adobe Reader, pressingAlt+Tab ↹ one time selects the second item in the list, which is the icon for the PDF document. Adobe Reader remains the current task whenAlt+Tab ↹ is released. Thus it is demonstrated that the correct operation ofAlt+Tab ↹, like some other aspects of the Windows environment such as theClipboard chain, depends on individual applications being written correctly.

See also

[edit]

References

[edit]
  1. ^Raymond Chen (2008-07-01)."Windows Vista changed the Alt+Tab order slightly".MSDN blog.Microsoft.Archived from the original on 3 August 2008. Retrieved2008-07-31.
  2. ^MSDN (2007-01-01)."SetWindowPos Function".MSDN.Microsoft. Retrieved2007-01-01.
  3. ^Raymond Chen (2003-10-20)."What is the Alt+Tab order?".The Old New Thing.Microsoft.Archived from the original on 5 September 2006. Retrieved2006-09-24.
  4. ^"Windows 0-day exploit CVE-2019-1458 used in Operation WizardOpium".Securelist.Kaspersky. 2019-12-10. Retrieved2023-08-27.... Our detailed analysis of the EoP exploit revealed that the vulnerability it used belongs to the win32k.sys driver ... The vulnerability itself is related to windows switching functionality (for example, the one triggered using the Alt-Tab key combination). That's why the exploit's code uses a few WinAPI calls (GetKeyState/SetKeyState) to emulate a key press operation. ...
  5. ^Russinovich, Mark (2005-07-24)."Running Windows with No Services".Mark's Sysinternals Blog.Sysinternals. Retrieved2006-09-24.
  6. ^Richter, Jeffrey (July 2000)."Win32 Q&A: Handy Features in Windows, and Interlocked Functions".MSDN Magazine.Microsoft. Retrieved2006-09-24.
  7. ^ab"Microsoft PowerToys for Windows XP".Microsoft. 2005-11-01. Archived fromthe original on 6 October 2006. Retrieved2006-09-24.
  8. ^Malek, Andrew."Change the Alt+Tab Layout to Show More Icons".MalekTips.
  9. ^Windows 7 - Alt-Tab icon list does not stay on top
  10. ^Alt-tab window won't stay on top of other windows in Windows 7
  11. ^Windows 7 alt-tab window disappears to back when aero peek is enabled
  12. ^Dawson, Bruce (2013-05-28)."Alt+Tab Bug Worsened by IE 10, But Fix Found".Random ASCII. Retrieved2015-12-13.
  13. ^Windows 7 - Keyboard keeps changing language
  14. ^How to avoid keyboard layout automatically changing on windows
  15. ^"Raymond Chen Discusses the Alt+Tab and Alt+Esc Hotkeys". 8 September 2016.
  16. ^Windows 3.1 Resource Kit WIN.INI Section Settings

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=Alt-Tab&oldid=1336391917"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp