Well here’s a trick I learned that will really help those new Mac adoptors. A crucial shortcut that exists on the Windows platform is not in Mac OS X. But being a highly customizable OS you can enable it yourself using Automator.
In every Windows since Windows 2000 you could lock your window by using WIN+L keyboard combination. In OS X there is no ‘lock’ window option but you can go to Login Window by enabling Fast User Switching and going into its menu near the top right of the menubar.
It’s easy to script OS X to use a keyboard shortcut and invoking Login Window.
- Open Applications -> Automator
- Choose the Service workflow template.
- Under the 1st column called Library on the left choose Utilities, then drag Run Shell Script in the 2nd column into the window on the right.
- Change Service receives selected ‘text’ to ‘no input’.
- Then copy paste the following script into the text field exactly:
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
Save this new Service with a name that makes sense. I named mine “Login Window”. From now on it will appear under any application’s Services menu.
Finally, assign a keyboard shortcut to this Service. Open System Preferenes -> Keyboard -> Keyboard Shortcuts. You should see Services in the left column, select it and scroll down so you see Login Window. Double click on the space on the right and you can assign a keyboard combination to trigger this service. I used CTRL + ALT + COMMAND + L.
artofgeek.com