Whether your mouse has stopped working or your screen cut out, you can still turn off your computer safely using the keyboard. On any version of Windows since Vista, pressing Alt-F4 on the desktop acts as a shortcut to shut down the system. Just pick Shut Down from the list and press Enter.
Press Windows-D to minimize all open windows and switch to the desktop. If you're using Windows 8 and have a Windows 8 app or the Start screen open, press Windows-D twice -- once to switch to desktop mode, and then again to reach the actual desktop from any open programs.
If you have programs open, you should quit each program to save your work before switching to the desktop and shutting down your computer. Almost all programs quit with the shortcut Alt-F4, and you can use the arrows or underlined letters to save. For example, in Word, Alt-F4, S quits and saves.
Press Alt-F4 on the desktop to open the Shut Down Windows dialog box on Windows 8, 7 or Vista.
Even on a computer with a working mouse, this is the fastest way to shut down a Windows 8 computer, which otherwise takes several additional button presses and clicks.
Use the arrow keys to select Shut Down and press Enter to shut down. If your screen isn't working, "Shut Down" is the next to last option in the list, so you can hold down the Down arrow for a few moments to scroll to the bottom, and then press Up one time. To reboot, choose the very bottom option instead.
To cancel without shutting down, press Esc.
On Windows 8, you can alternatively shut down using the Charms menu from anywhere on the system. To shut down using the keyboard, press "Windows-I" to open the Settings charm. Hold the "Down" arrow to reach the bottom of the panel, tap "Up" once and "Right" once and press "Enter" to select the Power options. From there, tap "Up" once for "Restart" or twice for "Shut Down," and press "Enter" to confirm.
On Windows 7 and Vista, you can also shut down by pressing the "Windows" key and using the arrows to select "Shut Down" on the Start menu. If you see only a "Sleep" button, select the nearby arrow to see the other power options.
In the Power Options Control Panel, you can customize power button actions to make it function as a safe "Shut Down" or "Sleep" button. On Windows 7 or 8, open the Power Options Control Panel and click "Choose What the Power Buttons Do." Regardless of your setting, holding the power button for five seconds instantly cuts power, so hold in the button only if the system completely freezes and a normal "Shut Down" doesn't work.