This is probably the most-frequently-asked keyboard question for Windows 7: How to use the keyboard to shutdown or restart.
If you have a laptop, it may have a sleep shortcut with something like Fn+F1, but this is how you can go about it universally:
- Press the Windows key. The Start menu appears.
- Press the Right Arrow key. The focus is now on the Shutdown button.
- The default action is to Shutdown. If you want to do that, you can just press Space and your system will begin shutting down immediately.
- If you want to restart, just press the Right Arrow again. The Shutdown menu appears. To Restart, press R. To choose any other action, press the underlined letter.