For years I’ve been searching for a keyboard shortcut that would instantly lock my screen / desktop. I’ve seen this on Linux window managers and something like this probably exists on every major operating system.
My current workaround was to open Keychain.app, enable the menu bar icon in the preferences and click each time on the menu bar item -> lock screen.
I tried AppleScript, I tried Automator, I even convinced a friend that it would be necessary to write a small app for this. Recently however, somebody said that there is such a shortcut and that it exists since Mac OS 8.
This holy shortcut is:
⌃ + ⇧ + ⏏ (Control + Shift + Eject)
On Macs without an Eject key you can use the power button in the shortcut instead.
You have to enable »Require Password immediately after sleep or screen saver begins« in the System Preferences -> Security to make this truly lock your screen.
There are probably many other shortcuts in Mac OS I don’t know. If you have any hints where to get a complete list, please let me know!
High Sierra Update
With macOS 10.13 there is now a dedicated screen lock feature which can be invoked with this new shortcut:
⌃ + ⌘ + Q (Control + Command + Q)
- In Mac OS X terminology this shortcut puts the display immediately to sleep.
- A website listing this and other shortcuts can be found here