- Closing the Window
- Quickly Close Open Windows Using Shortcut Keys
- How to type your way out of a mess with Windows keyboard shortcuts
- How to Close Windows With Alt + Spacebar + C
- How to Close Windows With Fn + Alt + F4
- How to Close Tabs With CTRL + W
- How to Select Open Windows With Alt + Tab
- How to See Your Desktop With Windows Key + D
- How to Close a Group of Windows With the Mouse
- List of all Windows 10 keyboard shortcuts: The ultimate guide
- Windows 10 keyboard shortcuts
- Essential shortcuts
- 1. ExpressVPN: The best VPN available right now
- Desktop shortcuts
- File Explorer shortcuts
- Command Prompt shortcuts
- Windows key shortcuts
- More Windows 10 resources
- Halo: MCC’s live service elements make it better, not worse
- Microsoft’s Surface Duo is not ‘failing up’
- Here’s what you can do if Windows 10 update KB5001330 is causing issues
- These external monitors go perfectly with the Lenovo ThinkPad X1 Carbon
Closing the Window
When the user closes a window, that action triggers a sequence of window messages.
The user can close an application window by clicking the Close button, or by using a keyboard shortcut such as ALT+F4. Any of these actions causes the window to receive a WM_CLOSE message. The WM_CLOSE message gives you an opportunity to prompt the user before closing the window. If you really do want to close the window, call the DestroyWindow function. Otherwise, simply return zero from the WM_CLOSE message, and the operating system will ignore the message and not destroy the window.
Here is an example of how a program might handle WM_CLOSE.
In this example, the MessageBox function shows a modal dialog that contains OK and Cancel buttons. If the user clicks OK, the program calls DestroyWindow. Otherwise, if the user clicks Cancel, the call to DestroyWindow is skipped, and the window remains open. In either case, return zero to indicate that you handled the message.
If you want to close the window without prompting the user, you could simply call DestroyWindow without the call to MessageBox. However, there is a shortcut in this case. Recall that DefWindowProc executes the default action for any window message. In the case of WM_CLOSE, DefWindowProc automatically calls DestroyWindow. That means if you ignore the WM_CLOSE message in your switch statement, the window is destroyed by default.
When a window is about to be destroyed, it receives a WM_DESTROY message. This message is sent after the window is removed from the screen, but before the destruction occurs (in particular, before any child windows are destroyed).
In your main application window, you will typically respond to WM_DESTROY by calling PostQuitMessage.
We saw in the Window Messages section that PostQuitMessage puts a WM_QUIT message on the message queue, causing the message loop to end.
Here is a flow chart showing the typical way to process WM_CLOSE and WM_DESTROY messages:
Quickly Close Open Windows Using Shortcut Keys
How to type your way out of a mess with Windows keyboard shortcuts
One of the advantages of Microsoft Windows PCs is that you can have many different programs and windows open at the same time. This advantage becomes a disadvantage, however, when you have to close dozens of open windows. Fortunately, you can carry out repetitive actions like closing windows with keyboard shortcuts.
Instructions in this article apply to Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.
How to Close Windows With Alt + Spacebar + C
One option for closing windows with keyboard shortcuts is as follows:
Open the window that you would like to close using your mouse.
Press and hold down the Alt key, then press the Spacebar to reveal the right-click context menu at the top of the program window you’re trying to close.
Release both keys and press the letter C. This will cause the window to close.
If you can execute this sequence using one hand while the other hand controls the mouse, you’ll be able to close roughly a dozen windows in about as many seconds.
How to Close Windows With Fn + Alt + F4
Another option is to select the window you want to close and then press Fn+Alt+F4. You’ll probably need two hands for this one.
Although the shortcut is officially listed as Alt+F4, you must hold down the Function (Fn) key for it to work.
How to Close Tabs With CTRL + W
The Ctrl+W shortcut only closes the current file you’re working on, but it leaves the program open. This feature can be handy if you want to leave the desktop program open but get rid of all the files you’re working on in quick succession.
Ctrl+W works in most browsers too, so you can close the current tab you’re looking at without taking your hands off the keyboard. If you use Ctrl+W when only one browser tab is open, then the program window will close.
How to Select Open Windows With Alt + Tab
It’s possible to select an open window without using the mouse. Press Alt+Tab to cycle through your open windows. Use this shortcut in conjunction with the other shortcuts to close all open windows without taking your hands off the keyboard.
How to See Your Desktop With Windows Key + D
Sometimes you don’t actually want to close all those windows; what you really want to do is just look at your desktop. To quickly access your desktop, press the Windows Key+D. Use the same shortcut to bring back all your windows.
If you are running Windows 7 or later, there are multiple ways to access your Windows desktop.
How to Close a Group of Windows With the Mouse
When you have numerous files open in the same program, like a bunch of emails in Outlook, Word files, or several spreadsheets in Excel, you can close all of them at once using the mouse. Right-click the program in the Windows taskbar and select Close all windows (or Close Group in older versions of Windows).
List of all Windows 10 keyboard shortcuts: The ultimate guide
Source: Daniel Rubino/Windows Central
On Windows 10, keyboard shortcuts provide a quick way to navigate and operate the experience and features using a single press of one or multiple keys, which otherwise will take several clicks and more time to accomplish using the mouse.
Although it can be overwhelming trying to memorize all the available keyboard shortcuts, it’s important to consider that most people don’t need to learn every shortcut on Windows 10. Only focusing on those you need to use more frequently can noticeably make things easier and help you to work more efficiently.
In this Windows 10 guide, we’ll show you all the most useful keyboard shortcuts to navigate and operate the desktop and apps. Also, we’ll outline the shortcuts that are essential for all users.
Windows 10 keyboard shortcuts
This comprehensive list includes the most useful keyboard shortcuts to perform tasks on Windows 10 a little faster.
Essential shortcuts
These are the essential keyboard shortcuts that every Windows 10 user should know.
Keyboard shortcut | Action |
---|---|
Ctrl + A | Select all content. |
Ctrl + C (or Ctrl + Insert) | Copy selected items to clipboard. |
Ctrl + X | Cut selected items to clipboard. |
Ctrl + V (or Shift + Insert) | Paste content from clipboard. |
Ctrl + Z | Undo an action, including undelete files (limited). |
Ctrl + Y | Redo an action. |
Ctrl + Shift + N | Create new folder on desktop or File Explorer. |
Alt + F4 | Close active window. (If no active window present, then shutdown box appears.) |
Ctrl + D (Del) | Delete selected item to the Recycle Bin. |
Shift + Delete | Delete selected item permanently skipping Recycle Bin. |
F2 | Rename selected item. |
ESC | Close current task. |
Alt + Tab | Switch between open apps. |
PrtScn | Take screenshot and stores it in clipboard. |
Windows key + I | Open Settings app. |
Windows key + E | Open File Explorer. |
Windows key + A | Open Action center. |
Windows key + D | Display and hide the desktop. |
Windows key + L | Lock device. |
Windows key + V | Open Clipboard bin. |
Windows key + Period (.) or semicolon (;) | Open emoji panel. |
Windows key + PrtScn | Capture full screenshot in the «Screenshots» folder. |
Windows key + Shift + S | Capture part of the screen with Snip & Sketch. |
Windows key + Left arrow key | Snap app or window left. |
Windows key + Right arrow key | Snap app or window right. |
1. ExpressVPN: The best VPN available right now
This is our top pick for anyone looking to get started with a VPN. It offers a great mix of speed, reliability, outstanding customer service, and affordability. There is a 30-day money-back guarantee, so give it a shot today.
Desktop shortcuts
You can use these keyboard shortcuts to open, close, navigate, and complete specific tasks more quickly throughout the desktop experience, including on Start menu, taskbar, Settings, and more.
Keyboard shortcut | Action |
---|---|
Windows key (or Ctrl + Esc) | Open Start menu. |
Ctrl + Arrow keys | Change Start menu size. |
Ctrl + Shift + Esc | Open Task Manager. |
Ctrl + Shift | Switch keyboard layout. |
Alt + F4 | Close active window. (If no active window present, then shutdown box appears.) |
Ctrl + F5 (or Ctrl + R) | Refresh current window. |
Ctrl + Alt + Tab | View open apps. |
Ctrl + Arrow keys (to select) + Spacebar | Select multiple items on desktop or File Explorer. |
Alt + Underlined letter | Runs command for the underlined letter in apps. |
Alt + Tab | Switch between open apps while pressing Tab multiple times. |
Alt + Left arrow key | Go back. |
Alt + Right arrow key | Go forward. |
Alt + Page Up | Move up one screen. |
Alt + Page down | Move down one screen. |
Alt + Esc | Cycle through open windows. |
Alt + Spacebar | Open context menu for the active window. |
Alt + F8 | Reveals typed password in Sign-in screen. |
Shift + Click app button | Open another instance of an app from the taskbar. |
Ctrl + Shift + Click app button | Run app as administrator from the taskbar. |
Shift + Right-click app button | Show window menu for the app from the taskbar. |
Ctrl + Click a grouped app button | Cycle through windows in the group from the taskbar. |
Shift + Right-click grouped app button | Show window menu for the group from the taskbar. |
Ctrl + Left arrow key | Move the cursor to the beginning of the previous word. |
Ctrl + Right arrow key | Move the cursor to the beginning of the next word. |
Ctrl + Up arrow key | Move the cursor to the beginning of the previous paragraph |
Ctrl + Down arrow key | Move the cursor to the beginning of the next paragraph. |
Ctrl + Shift + Arrow key | Select block of text. |
Ctrl + Spacebar | Enable or disable Chinese IME. |
Shift + F10 | Open context menu for selected item. |
F10 | Enable app menu bar. |
Shift + Arrow keys | Select multiple items. |
Windows key + X | Open Quick Link menu. |
Windows key + Number (0-9) | Open app in number position from the taskbar. |
Windows key + T | Cycle through apps in the taskbar. |
Windows key + Alt + Number (0-9) | Open Jump List of the app in number position from the taskbar. |
Windows key + D | Display and hide the desktop. |
Windows key + M | Minimize all windows. |
Windows key + Shift + M | Restore minimized windows on the desktop. |
Windows key + Home | Minimize or maximize all but the active desktop window. |
Windows key + Shift + Up arrow key | Stretch desktop window to the top and bottom of the screen. |
Windows key + Shift + Down arrow key | Maximize or minimize active desktop windows vertically while maintaining width. |
Windows key + Shift + Left arrow key | Move active window to monitor on the left. |
Windows key + Shift + Right arrow key | Move active window to monitor on the right. |
Windows key + Left arrow key | Snap app or window left. |
Windows key + Right arrow key | Snap app or window right. |
Windows key + S ( or Q) | Open Search. |
Windows key + Alt + D | Open date and time in the taskbar. |
Windows key + Tab | Open Task View. |
Windows key + Ctrl + D | Create new virtual desktop. |
Windows key + Ctrl + F4 | Close active virtual desktop. |
Windows key + Ctrl + Right arrow | Switch to the virtual desktop on the right. |
Windows key + Ctrl + Left arrow | Switch to the virtual desktop on the left. |
Windows key + P | Open Project settings. |
Windows key + A | Open Action center. |
Windows key + I | Open Settings app. |
Backspace | Return to Settings app home page. |
File Explorer shortcuts
On Windows 10, File Explorer includes many keyboard shortcuts to help you complete tasks a little quicker.
Here’s a list with the most useful shortcuts for File Explorer.
Keyboard shortcut | Action |
---|---|
Windows key + E | Open File Explorer. |
Alt + D | Select address bar. |
Ctrl + E (or F) | Select search box. |
Ctrl + N | Open new window. |
Ctrl + W | Close active window. |
Ctrl + F (or F3) | Start search. |
Ctrl + Mouse scroll wheel | Change view file and folder. |
Ctrl + Shift + E | Expands all folders from the tree in the navigation pane. |
Ctrl + Shift + N | Create new folder on desktop or File Explorer. |
Ctrl + L | Focus on the address bar. |
Ctrl + Shift + Number (1-8) | Changes folder view. |
Alt + P | Display preview panel. |
Alt + Enter | Open Properties settings for the selected item. |
Alt + Right arrow key | View next folder. |
Alt + Left arrow key (or Backspace) | View previous folder. |
Alt + Up arrow | Move up a level in the folder path. |
F11 | Switch active window full-screen mode. |
F5 | Refresh the instance of File Explorer. |
F2 | Rename selected item. |
F4 | Switch focus to address bar. |
F5 | Refresh File Explorer’s current view. |
F6 | Cycle through elements on the screen. |
Home | Scroll to top of the window. |
End | Scroll to bottom of window. |
Command Prompt shortcuts
If you use Command Prompt, you can use these keyboard shortcuts to work a little more efficiently.
Keyboard shortcut | Action |
---|---|
Ctrl + A | Select all content of the current line. |
Ctrl + C (or Ctrl + Insert) | Copy selected items to clipboard. |
Ctrl + V (or Shift + Insert) | Paste content from clipboard. |
Ctrl + M | Starts mark mode. |
Ctrl + Up arrow key | Move screen up one line. |
Ctrl + Down arrow key | Move screen down one line. |
Ctrl + F | Open search for Command Prompt. |
Left or right arrow keys | Move cursor left or right in the current line. |
Up or down arrow keys | Cycle through command history of the current session. |
Page up | Move cursor one page up. |
Page down | Move cursor one page down. |
Ctrl + Home | Scroll to top of the console. |
Ctrl + End | Scroll to the bottom of the console. |
Windows key shortcuts
Using the Windows key combined with other keys, you can perform many useful tasks, such as launch Settings, File Explorer, Run command, apps pinned in the taskbar, or you can open specific features like Narrator or Magnifier. You can also accomplish tasks like controlling windows, virtual desktops, taking screenshots, locking your device, and a lot more.
Here’s a list with all the most common keyboard shortcuts using the Windows key.
Keyboard shortcut | Action |
---|---|
Windows key | Open Start menu. |
Windows key + A | Open Action center. |
Windows key + S ( or Q) | Open Search. |
Windows key + D | Display and hide the desktop. |
Windows key + L | Locks computer. |
Windows key + M | Minimize all windows. |
Windows key + B | Set focus notification area in the taskbar. |
Windows key + C | Launch Cortana app. |
Windows key + F | Launch Feedback Hub app. |
Windows key + G | Launch Game bar app. |
Windows key + Y | Change input between desktop and Mixed Reality. |
Windows key + O | Lock device orientation. |
Windows key + T | Cycle through apps in the taskbar. |
Windows key + Z | Switch input between the desktop experience and Windows Mixed Reality. |
Windows key + J | Set focus on a tip for Windows 10 when applicable.k |
Windows key + H | Open dictation feature. |
Windows key + E | Open File Explorer. |
Windows key + I | Open Settings. |
Windows key + R | Open Run command. |
Windows key + K | Open Connect settings. |
Windows key + X | Open Quick Link menu. |
Windows key + V | Open Clipboard bin. |
Windows key + W | Open the Windows Ink Workspace. |
Windows key + U | Open Ease of Access settings. |
Windows key + P | Open Project settings. |
Windows key + Ctrl + Enter | Open Narrator. |
Windows key + Plus (+) | Zoom in using the magnifier. |
Windows key + Minus (-) | Zoom out using the magnifier. |
Windows key + Esc | Exit magnifier. |
Windows key + Forward-slash (/) | Start IME reconversion. |
Windows key + Comma (,) | Temporarily peek at the desktop. |
Windows key + Up arrow key | Maximize app windows. |
Windows key + Down arrow key | Minimize app windows. |
Windows key + Home | Minimize or maximize all but the active desktop window. |
Windows key + Shift + M | Restore minimized windows on the desktop. |
Windows key + Shift + Up arrow key | Stretch desktop window to the top and bottom of the screen. |
Windows key + Shift + Down arrow key | Maximize or minimize active windows vertically while maintaining width. |
Windows key + Shift + Left arrow key | Move active window to monitor on the left. |
Windows key + Shift + Right arrow key | Move active window to monitor on the right. |
Windows key + Left arrow key | Snap app or window left. |
Windows key + Right arrow key | Snap app or window right. |
Windows key + Number (0-9) | Open app in number position in the taskbar. |
Windows key + Shift + Number (0-9) | Open another instance of the app in number position in the taskbar. |
Windows key + Ctrl + Number (0-9) | Switch to last active window of the app in number position in the taskbar. |
Windows key + Alt + Number (0-9) | Open Jump List of the app in number position in the taskbar. |
Windows key + Ctrl + Shift + Number (0-9) | Open another instance as an administrator of the app in number position in the taskbar. |
Windows key + Ctrl + Spacebar | Change previous selected input option. |
Windows key + Spacebar | Change keyboard layout and input language. |
Windows key + Tab | Open Task View. |
Windows key + Ctrl + D | Create a virtual desktop. |
Windows key + Ctrl + F4 | Close active virtual desktop. |
Windows key + Ctrl + Right arrow | Switch to the virtual desktop on the right. |
Windows key + Ctrl + Left arrow | Switch to the virtual desktop on the left. |
Windows key + Ctrl + Shift + B | Wake up the device when black or a blank screen. |
Windows key + PrtScn | Capture full screenshot in the «Screenshots» folder. |
Windows key + Shift + S | Create part of the screen screenshot. |
Windows key + Shift + V | Cycle through notifications.. |
Windows key + Ctrl + F | Open search for device on domain network. |
Windows key + Ctrl + Q | Open Quick Assist. |
Windows key + Alt + D | Open date and time in the taskbar. |
Windows key + Period (.) or semicolon (;) | Open emoji panel. |
Windows key + Pause | Show System Properties dialog box. |
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
We may earn a commission for purchases using our links. Learn more.
Halo: MCC’s live service elements make it better, not worse
Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.
Microsoft’s Surface Duo is not ‘failing up’
Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.
Here’s what you can do if Windows 10 update KB5001330 is causing issues
In this guide, we’ll show you the steps to get rid of the update KB5001330 to fix profile, gaming, and BSoD problems with the Windows 10 October 2020 Update and May 2020 Update.
These external monitors go perfectly with the Lenovo ThinkPad X1 Carbon
The Lenovo ThinkPad X1 Carbon is an excellent laptop, but what if you want to project the display onto a larger screen? You’ll need an external monitor for that. Here are our favorite options.