One of the most popular keyboard shortcuts is Alt + F4. Alt+F4 is a keyboard shortcut commonly used to close an active window in Windows.
However, it is worth noting that the response of programs to Alt+F4 can vary. Some programs will close immediately, with no warning or prompt to save changes. Others may prompt you to save your data before closing so that you don’t lose your work.
Below I will describe how to use Alt+F4 and other commonly used keyboard shortcuts to make your work more accessible. I’ll also tell you what key combination does the same thing on the Mac.
What is Alt + F4?
Alt + F4 is a keyboard shortcut in Windows that is used to close the currently active window or app.
Press Alt and F4 keys together to send a signal to the operating system to close the active window, which could be a software app, a folder, a document, or a web browser window. The operating system then performs the necessary tasks to close the window, such as saving any unsaved data and releasing any resources the window uses.
Alt + F4 is available for all Windows editions.
Sometimes, you may encounter a program or app that is not responding and cannot be closed using normal methods. In such cases, you can use Alt+F4 as a last resort to force-close the unresponsive program.
How to use Alt+F4?
To use the Alt + F4 keyboard shortcut:
- Ensure the window or app you want to close is active and selected.
- Hold down the Alt key on your keyboard.
- While holding down the Alt key, press the F4 key.
- Release both keys.
The active window should close immediately. If you have unsaved changes in the window, you may be prompted to save your changes before the window is closed.
It is important to note that Alt + F4 only closes the active window, not the entire PC. To shut down the PC, you need to use the Windows Start menu or press Ctrl + Alt + Delete and then click on the “Shut down” option.
Alt+F4 in different programs
Pressing the Alt+F4 key combination in different programs will result in the following effects:
Browser
If you are in an internet browser such as Google Chrome, Mozilla Firefox, Opera, and Microsoft Edge, you can press Alt+F4 to close the currently active browser window.
If you have a window open in your browser where you are editing and changing something, for example, Photopea, you will see a window with the question “Leave the site.”
Keep in mind that using this key combination will only close the windows; they can be opened through the History section.
Notepad
In text editors, pressing Alt+F4 will close the currently open document.
After pressing the combination, you will be presented with a window where you need to choose Save Current Document or Not Save. You can also choose to cancel it.
Then, when you open Notepad, you will be able to return to the document if you click on Save before closing the program.
Skype and Zoom
Alt+F4 can close the currently active video or audio call window in video calling programs.
But you will also see a window asking you to “End the meeting for everyone” or “Leave the meeting”.
Office apps – Microsoft Excel, PowerPoint, and Microsoft Word
In Office apps, Alt+F4 can close the currently open document or presentation.
But here, you will also have to choose whether to Save the file before closing the program or cancel this action. This will work if you have the auto-save function turned off.
If the autosave option is enabled, the Microsoft Excel, PowerPoint, and Microsoft Word windows will close instantly without any confirmation.
Adobe Photoshop
After pressing Alt+F4, you will be presented with a window where you have to choose Close or Cancel. But it will only appear if you are editing a file. Adobe Photoshop will close automatically if you have not started editing the file.
Games
In many computer games, pressing Alt+F4 will quit the game and close its window. Most games do not require any confirmation for this.
Dialog boxes
In dialog boxes or menus, pressing Alt+F4 will close that particular window or menu.
Pressing Alt+F4 in a settings window will normally close that window without saving the changes made.
In file selection windows, for example, when opening or saving a file, pressing Alt+F4 will close the file selection dialog box but probably will not affect the current action (opening or saving a file) in the program itself.
Programs | Result of Alt+F4 |
---|---|
Adobe Photoshop | Closes the active program window. |
Microsoft Excel, PowerPoint, Microsoft Word | If autosave is enabled – the program will close immediately. If not, you will be prompted to choose Save File or Cancel. |
Skype and Zoom | A pop-up window will appear, “End meeting for all” or “Leave meeting”. This will then close the active program window. |
Notepad | A window will appear with the choice to Save or Not Save the document. Then closes the program. |
Browser | A pop-up window will appear with a choice of “Leave” or “Cancel”. Closes the program window. |
Games | Will close the program window immediately. |
Dialog boxes | Will close the program window immediately. |
What to do if Alt + F4 doesn’t work?
If the Alt + F4 keyboard shortcut does not work, there are several things you can try:
Try again
Sometimes, the keyboard shortcut may not work on the first try. Try pressing the keys again to see if it works.
Make sure the window is active
Ensure that the window you want to close is selected and active. If not, click on the window to make it active, and then try using the Alt + F4 keyboard shortcut.
Check for other open programs
Some programs, such as certain games, may override the Alt + F4 keyboard shortcut. Check if any other programs are running and try closing them first.
Use the Task Manager
If you can’t activate Alt + F4, an active app can be closed using Task Manager. You should click on Ctrl + Alt + Delete and tap Task Manager to do that. You may also click on Ctrl + Shift + Esc to open Task Manager or right-click on the program you want to close and press “End task” instead.
Users often face the issue that the command doesn’t work on laptops or multifunction keyboards. The types of keyboards may cause it, as the function keys may also be used to adjust the brightness of your screen or playback volume. To use the Alt + F4 shortcut on these types of keyboards, you should click on the Fn key at the same time (Alt + Fn + F4).
How to Alt+F4 on a Mac?
If you’re looking for the equivalent of the Alt+F4 key combination for closing programs on a Mac, there is a similar way. On a Mac, you use the Command+Q key combination. When you press Command+Q, the active program or window closes. This is useful when you want to quickly close an application to free up resources or stop using it.
When you press Command+Q, the Mac sends a Quit command to the active application, and if you have unsaved changes to a document or project, the application can save the changes before closing.
The app also frees up memory and other system resources that it took up while it was running. Eventually, the application process ends completely when all windows are closed and resources are freed.
What is Ctrl + F4?
Ctrl + F4 is a keyboard shortcut in Windows that is used to close the current tab or document in a multi-tabbed app, such as a web browser or text editor.
Pressing the Ctrl and F4 keys together signals the app to close the current tab or document. The app then performs the necessary tasks to close the tab or document, such as saving unsaved data.
Ctrl+F4 in different programs
Browser
If you press Ctrl + F4 in all popular web browsers, such as Chrome, Edge, Firefox, and Opera, it will close the active window or the whole browser if only one tab is open.
Skype and Zoom
In applications for video conferencing – Ctrl+F4 has no effect. You need to use Alt+F4 to close the window.
Office apps – Microsoft Excel, PowerPoint, and Microsoft Word
In Office applications, pressing Ctrl + F4 allows you to close the currently open document or presentation.
If the autosave option is enabled, the Microsoft Excel, PowerPoint, and Microsoft Word windows will close instantly without any confirmation.
If not, you will have to choose whether to save the file before closing the program or cancel this action.
Adobe Photoshop
If you have Adobe Photoshop open, after pressing Ctrl+F4, nothing will happen.
Games
In games, Ctrl+F4 closes the window. This works the same way as with the Alt+F4 key combination.
Dialog boxes
In dialog boxes, the Ctrl+F4 key combination causes the window to close.
Programs | Result of Ctrl+F4 |
---|---|
Browser | Closes the current tab in the browser. |
Skype and Zoom | No action will happen |
Office apps | If autosave is enabled – the program will close immediately. If not, you will be prompted to choose Save File or Cancel. |
Adobe Photoshop | No action will happen |
Games | The game window will close. |
Dialog boxes | The dialog box will close. |
What is Ctrl + W?
Ctrl + W is a keyboard shortcut commonly used to close the current tab or document in a multi-tabbed app such as a web browser, text editor, or image editor.
Pressing the Ctrl and W keys together sends a signal to the app to close the current tab or document. The app then performs the necessary tasks to close the tab or document, such as saving unsaved data.
Ctrl+W in different programs
Browser
To close the particular tab, in the most popular web browsers such as Chrome, Edge, Firefox, and Opera, you should click on Ctrl + W. If only one tab is opened, the browser will be closed by clicking on Ctrl + W.
To restore or undo a closed tab, use the keyboard shortcut Ctrl + Shift + Tab.
Skype and Zoom
In Skype and Zoom, Ctrl+W will not give any action.
Office apps
In Microsoft Office programs, the Ctrl+W combination will close the currently active document or window. If changes have been made to the document, you will be prompted to save before closing, only if AutoSave is not enabled.
Adobe Photoshop
In Adobe Photoshop, the Ctrl+W combination can close the active window containing an open document or image. If you have multiple documents open in different windows, Ctrl+W will close the currently active window with an image. Photoshop may prompt you to confirm the save if the window contains unsaved changes before closing it.
Games
In games, Ctrl+W may not have a specific action, as game interfaces are usually tab-independent.
Dialog boxes
In dialog boxes, Ctrl+W is usually used in the same way as in other programs – to close the currently active dialog box.
Programs | Result of Ctrl+W |
---|---|
Browser | Closes the current request tab |
Skype and Zoom | There will be no action. |
Office apps | Closes the active document or the save request window if there are unsaved changes. |
Adobe Photoshop | Сlose the current image window, with a warning about unsaved changes. |
Games | There will be no action. |
Dialog boxes | Сlose the currently active dialog box |
What are the commonly used keyboard shortcuts in Windows?
Here are some commonly used keyboard shortcuts in Windows:
Keyboard shortcuts | Result |
---|---|
Ctrl + C | Copy the selected text or item |
Ctrl + V | Paste the copied text or item |
Ctrl + X | Cut the selected text or item |
Ctrl + Z | Undo the last action |
Ctrl + A | Select all text or items |
Ctrl + F | Open the search function in most apps |
Ctrl + P | Print the current page or document |
Alt + Tab | Switch between open apps or windows |
Windows key + D | Show the desktop |
Windows key + L | Lock your PC |
Windows key + S | Open the Windows search bar |
Ctrl + Alt + Delete | Open the Task Manager or Windows Security screen |
Alt + F4 | Close the active window |
Ctrl + Shift + Esc | Open the Task Manager |
These are some of the most commonly used keyboard shortcuts in Windows, and they can help you work more efficiently and save time when using your computer.
What are the commonly used keyboard shortcuts on Mac?
The most commonly used key on Mac:
Keyboard shortcuts | Result |
---|---|
Command + C | Copies the selected text or object to the clipboard |
Command + V | Paste. Inserts the contents of the clipboard at the current cursor position |
Command + Z | Cancels the last action |
Command + S | Saves the current document or file. |
Command + Tab | Start Spotlight. Opens the search bar to search for files, applications, and information quickly. |
Command + Space | Start Spotlight. Opens the search bar to quickly search for files, applications, and information. |
Command + A | Selects all text or objects in the current window. |
Command + W | Close Window. |
Command +comma | Opens application settings |
Command + X | Cut |
Command + F | Search. Opens a search field in the current application |
Command + N | Create New Document. Opens a new window or tab to create a new document in the current app |
Command + P | Opens the print settings window for the current document. |
Command + Option + Esc | Force close application |
Command + Shift + T | Restore the Closed Tab in the web browser |
Command + Option + D | Hides or shows the Dock panel on the screen. |
These keyboard shortcuts are also widely used for convenience and efficiency in everyday tasks. Remembering a few of them will speed up your work process.