This post lists all the shutdown / sleep / lock screen keyboard shortcuts mac osx that I have found on my macbook air. (I haven’t discovered the combos myself – I just run across them on the ‘net and sometimes they stick, these are the keyboard shortcuts I’ve learned)
1) Pull up the shutdown dialog.
ctrl + power button
2) Instantly lock the screen. The lock screen keyboard shortcut is the one I use the most other than just closing the lid.
[you have to have ‘require password immediately’ set in settings > security > general for a password prompt to appear.]
ctrl + shift + power-button.
3) Instant sleep.
cmd + alt + power-button
4) Instant logout.
cmd + alt + shift + q
5) Close all apps and shutdown.
cmd + ctrl + shift + power-button
6) Close all apps and reboot.
cmd + ctrl + power-button
There may be others, I haven’t tried all combinations. I usually use the lock screen keyboard shortcut, or even just shut the lid on my macbook air – then the screen is locked and a password is required to login.