You can also use keyboard shortcuts to restart, hibernate, and put your PC to sleep. Whether your mouse is glitchy or your trackpad is having a moment, the few seconds you can save will come in handy when speed is important.
This article will show you how to restart a computer with a keyboard and how to put your computer to sleep with keyboard shortcuts. We’ll also share custom methods for shutdown, restart, and sleep commands, giving you more options and control.
How to Shut Down, Restart, or Put Windows PC to Sleep with a Keyboard
Use the Alt + F4 Combo (The Shut Down Windows Dialog)
Pressing the Alt + F4 keyboard hotkey closes any open program just like clicking the X button in the top-right corner of a window. However, the same keyboard shortcut will produce the Shut Down Windows dialog when you’re on your desktop environment or don’t have any active windows open.
You can press the Alt + F4 hotkey simultaneously until all your windows are closed and you see the Shut Down dialog. You could also press Win + D to go to your desktop, then tap the Alt + F4 shortcut.
After the Shut Down Windows dialog opens, select the action you want to execute (you can use your arrow keys), and hit the Enter button.
That’s how to turn off your computer with your keyboard. You can move on to the next method if you want more options or don’t fancy the Alt + F4 combo.
Use the Power User Shortcut
This method shows you how to put your computer to sleep or restart or shut it down using a few key sequences.
Pressing the Windows and X keyboard buttons simultaneously summons the Power User Menu, which appears on top of the Windows logo in your taskbar.
Once the menu appears, you can press a sequence of keys to choose a power action.
- Press Win + X.
- Tap the U button on your keyboard after you see the Power User Menu.
- The “Shut down or sign out” submenu will now expand.
- Use the following keys to choose your option:
I – Sign out
R – Restart
S – Sleep
U – Shut down the computer
Creating Your Own Keyboard Shortcut
Making your own sleep, shutdown, and restart shortcuts is a cool trick that allows you to pick a custom keyboard combination to trigger your desired actions.
The process starts with creating a shortcut that executes the command. After that, you can assign a custom keyboard combo to launch the shortcut.
Follow these steps to create a new shortcut:
- Go to your desktop interface and right-click an empty spot.
- Select New > Shortcut.
- Once the Create Shortcut dialog appears, go to the text box under “Type the location of the item” and enter one of the following:
shutdown /s (to shut down Windows without force-quitting your apps)
shutdown.exe -s -t 00 -f(to shut down Windows and forcibly close any open app)
shutdown /r /f /t 0(shortcut to restart computer – forcibly close apps, shut down Windows, and then restarts the computer)
rundll32.exe powrprof.dll,SetSuspendState 0,1,0(shortcut to put computer to sleep)
Each command should go for each shortcut you want to create.
Click Next and type a name to identify the shortcut. You can use Restart for the restart shortcut and Shutdown for the shortcut that shuts down the computer.
- Click Finish.
Follow these steps to assign a keyboard combination to the shortcut:
- Right-click the shortcut you just created and select Properties.
- Go to the Shortcut key text box when the Shortcut tab of the Properties dialog appears.
- Tap the keyboard combination you want to use.
- Click the OK button.
Ensure you pick a shortcut that isn’t already in use by Windows or other programs to avoid conflicts. For example, the CTRL + Shift + C shortcut helps you check word counts when typing in Google Docs. You don’t want to accidentally shut down your system when you hit that combination.
Use Your Dedicated Sleep Button
Some computers and keyboards provide dedicated sleep buttons that allow users to put their PCs to sleep with just a single tap.
The key may have a Zz icon and may be stand-alone or integrated into a function key. If it’s attached to a function key, you may have to press and hold the Fn key before tapping it.
Note that it’s fine if your computer doesn’t have a dedicated sleep key. You can convert your power button.
Pro Tip: Making Your Power Button Your Dedicated Sleep Button
While this method doesn’t involve using your keyboard, it’s one of the fastest ways to knock your PC out.
Depending on your computer’s factory settings, pressing your power button should initiate the shutdown process. In some cases, it will only lock your computer or sign you out. If you don’t need these functionalities, you can make the power button more useful.
Follow these steps:
- Launch the Start menu using the Windows button on your keyboard.
- Search for and launch Control Panel.
- Click Hardware and Sound.
- After the Hardware and Sound window appears, go to the Power Options section and click “Change what the power buttons do.”
- On the next page, select Sleep next to “When I press the power button.” If you use a laptop, you can choose the Sleep option in the On battery and Plugged in menus. You can also choose the Sleep option next to “When I close the lid.”
Press Ctrl + Shift + Esc shortcut to open the Task Manager directly and to manage running processes and troubleshoot performance issues efficiently.
Press Alt + Tab shortcut to switch between open windows and applications and to make it easy to navigate multiple tasks simultaneously.
That’s how to shut down and put your computer to sleep without swipes and clicks. The methods above also show you how to restart a laptop with a keyboard. You can now perform these actions faster without reaching for your mouse or trackpad.
Share your experience with these shortcuts with us in the comments section below.